WordPress.org

Plugin Directory

Changeset 995527


Ignore:
Timestamp:
09/23/14 16:33:19 (3 years ago)
Author:
blazingtorch
Message:

PrayBox 1.2 - WP 4.0

Location:
praybox/trunk
Files:
2 added
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • praybox/trunk/inc/edit_request_form.php

    r585375 r995527  
    1111?>   
    1212<form method="post" action=""> 
    13         <input type="hidden" name="action" value="edit_request_exec" /> 
    14         <input type="hidden" name="pb_request_id" value="<?php echo $req_id; ?>" /> 
     13    <input type="hidden" name="action" value="edit_request_exec" /> 
     14    <input type="hidden" name="pb_request_id" value="<?php echo $req_id; ?>" /> 
    1515 
    16     <table class="form-table"> 
    17         <tr valign="top"> 
    18         <th scope="row">First Name</th> 
    19         <td><input type="text" name="first_name" value="<?php echo $first_name; ?>" /></td> 
    20         </tr> 
     16    <div class="formfield"> 
     17    <label>First Name</label> 
     18    <div class="formelement"><input type="text" name="first_name" value="<?php echo $first_name; ?>" /></div> 
     19    </div> 
    2120 
    22         <tr valign="top"> 
    23         <th scope="row">Last Name</th> 
    24         <td><input type="text" name="last_name" value="<?php echo $last_name; ?>" /></td> 
    25         </tr> 
     21    <div class="formfield"> 
     22    <label>Last Name</label> 
     23    <div class="formelement"><input type="text" name="last_name" value="<?php echo $last_name; ?>" /></div> 
     24    </div> 
    2625 
    27         <tr valign="top"> 
    28         <th scope="row">Email Address</th> 
    29         <td><input type="text" name="email" value="<?php echo $email; ?>" /></td> 
    30         </tr> 
     26    <div class="formfield"> 
     27    <label>Email Address</label> 
     28    <div class="formelement"><input type="text" name="email" value="<?php echo $email; ?>" /></div> 
     29    </div> 
    3130 
    32         <tr valign="top"> 
    33         <th scope="row">Request Title</th> 
    34         <td><input type="text" name="title" value="<?php echo $title; ?>" /></td> 
    35         </tr> 
     31    <div class="formfield"> 
     32    <label>Request Title</label> 
     33    <div class="formelement"><input type="text" name="title" value="<?php echo $title; ?>" /></div> 
     34    </div> 
    3635 
    37         <tr valign="top"> 
    38         <th scope="row">Request Body</th> 
    39         <td><textarea name="body"><?php echo $body; ?></textarea></td> 
    40         </tr> 
     36    <div class="formfield"> 
     37    <label>Request Body</label> 
     38    <div class="formelement"><textarea name="body"><?php echo $body; ?></textarea></div> 
     39    </div> 
    4140 
    42     </table> 
    43     <p class="submit"> 
    44     <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" /> 
    45     </p> 
     41    <div class="formfield"> 
     42        <div class="formelement submit"> 
     43        <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" /> 
     44        </div> 
     45    </div> 
    4646 
    4747</form> 
  • praybox/trunk/inc/functions.php

    r656528 r995527  
    6060    $requests=$wpdb->get_results("SELECT id,first_name,last_name,email,title,body,ip_address,submitted FROM ".$wpdb->prefix."pb_requests $querycond ORDER BY submitted DESC"); 
    6161     
    62     foreach($requests as $req){ 
    63         $req_id=$req->id; 
    64         $first_name=stripslashes($req->first_name); 
    65         $last_name=stripslashes($req->last_name); 
    66         $email=$req->email; 
    67         $title=stripslashes($req->title); 
    68         $body=prePgphOutput($req->body); 
    69         $ip=$req->ip_address; 
    70         $submitted=date("m-d-y",$req->submitted); 
    71         $num_prayers=howManyPrayers($req_id); 
    72          
    73         $output.="<tr class='datarow'><td>$req_id</td><td>$first_name $last_name<br />$email</td><td><strong>$title</strong><br />$body</td><td>$ip</td><td>$submitted</td><td>$num_prayers</td><td align='center'>"; 
    74  
    75         if($status=="pending"){ 
    76             $output.="<form method='post'><input type='hidden' name='action' value='approve_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Approve Request' /></form>"; 
    77             $output.="<form method='post'><input type='hidden' name='action' value='edit_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Edit Request' /></form>"; 
    78             $output.="<form method='post'><input type='hidden' name='action' value='remove_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Remove Request' /></form>"; 
    79             $output.="<form method='post'><input type='hidden' name='action' value='remove_ban' /><input type='hidden' name='pb_ip_address' value='$ip' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Remove and Ban IP' /></form>"; 
     62    if($requests){ 
     63        foreach($requests as $req){ 
     64            $req_id=$req->id; 
     65            $first_name=stripslashes($req->first_name); 
     66            $last_name=stripslashes($req->last_name); 
     67            $email=$req->email; 
     68            $title=stripslashes($req->title); 
     69            $body=prePgphOutput($req->body); 
     70            $ip=$req->ip_address; 
     71            $submitted=date("m-d-y",$req->submitted); 
     72            $num_prayers=howManyPrayers($req_id); 
     73             
     74            $output="<tr><td>$req_id</td><td>$first_name $last_name<br />$email</td><td><strong>$title</strong><br />$body</td><td>$ip</td><td>$submitted</td><td>$num_prayers</td><td>"; 
     75     
     76            if($status=="pending"){ 
     77                $output.="<form method='post'><input type='hidden' name='action' value='approve_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Approve' /></form>"; 
     78                $output.="<form method='post'><input type='hidden' name='action' value='edit_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Edit' /></form>"; 
     79                $output.="<form method='post'><input type='hidden' name='action' value='remove_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Delete' /></form>"; 
     80                $output.="<form method='post'><input type='hidden' name='action' value='remove_ban' /><input type='hidden' name='pb_ip_address' value='$ip' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Remove/Ban' /></form>"; 
     81            } 
     82            if($status=="active"){ 
     83                //$output.="<form method='post'><input type='hidden' name='action' value='edit_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Edit' /></form>"; 
     84                $output.="<form method='post'><input type='hidden' name='action' value='remove_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Remove' /></form>"; 
     85                $output.="<form method='post'><input type='hidden' name='action' value='close_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Close' /></form>"; 
     86                $output.="<form method='post'><input type='hidden' name='action' value='remove_ban' /><input type='hidden' name='pb_ip_address' value='$ip' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Remove/Ban' /></form>"; 
     87            } 
     88            if($status=="closed"){ 
     89                //$output.="<form method='post'><input type='hidden' name='action' value='archive_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Archive' /></form>"; 
     90                $output.="<form method='post'><input type='hidden' name='action' value='remove_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Remove' /></form>"; 
     91                $output.="<form method='post'><input type='hidden' name='action' value='reopen_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Reopen' /></form>"; 
     92            } 
     93             
     94            $output.="</td></tr>"; 
    8095        } 
    81         if($status=="active"){ 
    82             //$output.="<form method='post'><input type='hidden' name='action' value='edit_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Edit Request' /></form>"; 
    83             $output.="<form method='post'><input type='hidden' name='action' value='remove_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Remove Request' /></form>"; 
    84             $output.="<form method='post'><input type='hidden' name='action' value='close_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Close Request' /></form>"; 
    85             $output.="<form method='post'><input type='hidden' name='action' value='remove_ban' /><input type='hidden' name='pb_ip_address' value='$ip' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Remove and Ban IP' /></form>"; 
    86         } 
    87         if($status=="closed"){ 
    88             //$output.="<form method='post'><input type='hidden' name='action' value='archive_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Archive Request' /></form>"; 
    89             $output.="<form method='post'><input type='hidden' name='action' value='remove_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Remove Request' /></form>"; 
    90             $output.="<form method='post'><input type='hidden' name='action' value='reopen_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Reopen Request' /></form>"; 
    91         } 
    92          
    93         $output.="</td></tr>"; 
     96    }else{ 
     97        $output="<tr><td colspan='7'>There are currently no $status prayer requests.</td></tr>"; 
    9498    } 
    9599    return $output; 
  • praybox/trunk/inc/inc_display_pb_forms.php

    r585375 r995527  
    44 
    55 
    6 if($_POST['action']=="update_request"){ 
     6if(isset($_POST['action']) && $_POST['action']=="update_request"){ 
    77 
    88//UPDATE REQUEST 
    99    $req_id=$_POST['req_id']; 
    10     if($_POST['anon']=='on'){$anon=1;}else{$anon=0;}     
    11     if($_POST['notify']=='on'){$notify=1;}else{$notify=0;} 
    12     if($_POST['closed']=='on'){ 
     10    $anon=(isset($_POST['anon']) && $_POST['anon']=='on')? 1 : 0;    
     11    $notify=(isset($_POST['notify']) && $_POST['notify']=='on')? 1 : 0; 
     12    if(isset($_POST['closed']) && $_POST['closed']=='on'){ 
    1313        $closed=time(); 
    1414        $active=2; 
     
    3333return $updated_request_output; 
    3434 
    35 }elseif($_POST['action']=="submit_request"){ 
     35}elseif(isset($_POST['action']) && $_POST['action']=="submit_request"){ 
    3636//Submit Request to DB, Email Mgmt Link, and Display a Message 
    37     if($_POST['first_name']!=""){$first_name=clean($_POST['first_name']);}else{$first_name="anon";} 
    38     if($_POST['last_name']!=""){$last_name=clean($_POST['last_name']);}else{$last_name="anon";} 
    39     if($_POST['anon']=='on'){$anon=1;}else{$anon=0;}     
     37    $first_name=(isset($_POST['first_name']) && $_POST['first_name']!="")? clean($_POST['first_name']) : "anon"; 
     38    $last_name=(isset($_POST['last_name']) && $_POST['last_name']!="")? clean($_POST['last_name']) : "anon"; 
     39    $anon=(isset($_POST['anon']) && $_POST['anon']=='on')? 1 : 0;    
    4040    $email=$_POST['email'];  
    4141    $authcode=rand_chars(); 
    4242    $title=clean($_POST['title']);   
    4343    $body=clean($_POST['body']);     
    44     if($_POST['notify']=='on'){$notify=1;}else{$notify=0;} 
     44    $notify=(isset($_POST['notify']) && $_POST['notify']=='on')? 1 : 0; 
    4545    $ip_address=$_SERVER['REMOTE_ADDR']; 
    4646    $time_now=time(); 
     
    5252    //IF NO FLAGS, RUN IT 
    5353    if($flaggit==0){ 
     54        $site_name=get_bloginfo('name'); 
     55         
    5456        $wpdb->insert($wpdb->prefix.'pb_requests',array('first_name'=>$first_name,'last_name'=>$last_name,'anon'=>$anon,'email'=>$email,'authcode'=>$authcode,'submitted'=>$time_now,'title'=>$title,'body'=>$body,'notify'=>$notify,'ip_address'=>$ip_address,'active'=>$active)); 
    5557         
     
    6163        $email_message.="\n\nYour prayer request has been posted. If you would like to edit your prayer request or submit a praise report for an answered prayer, click here: $management_url\n\nIf you have indicated that you would like to receive notifications, you will receive an email at the end of each day that your prayer request is lifted up to the Lord letting you know how many times you were prayed for that day.\n\n"; 
    6264        $email_message.=get_option('pb_email_suffix'); 
    63         $headers .= 'Reply-To:'.$site_name.' <'.$email_from.'>'."\r\n"; 
     65        $headers= 'Reply-To:'.$site_name.' <'.$email_from.'>'."\r\n"; 
    6466        $headers.= 'From:'.$site_name.' <'.$email_from.'>'."\r\n"; 
    6567         
     
    9597}else{ 
    9698 
    97 if($_GET['pbid']==""){ 
     99if(!isset($_GET['pbid']) || $_GET['pbid']==""){ 
    98100 
    99101//INITIAL SUBMISSION FORM OUTPUT 
  • praybox/trunk/inc/inc_pb_bannedips_page.php

    r722104 r995527  
    66<div class="wrap"> 
    77<h2 class="logo-title">PrayBox Banned IP Addresses</h2> 
     8<div id="pbx-wrap"> 
    89 
    910<?php 
     
    1516<?php } ?> 
    1617 
    17 <table class="gdadmin"> 
    18 <tr class="headrow"><td>ID</td><td>IP Address</td><td>Date Banned</td><td>Reason</td><td>&nbsp;</td></tr> 
     18<table class="pbx-data"> 
     19<tr><th>ID</th><th>IP Address</th><th>Date Banned</th><th>Reason</th><th>&nbsp;</th></tr> 
    1920 
    2021<?php 
    2122$bannedips=$wpdb->get_results("SELECT id,ip_address,banned_date,reason FROM ".$wpdb->prefix."pb_banned_ips ORDER BY banned_date DESC"); 
    2223 
    23 foreach($bannedips as $bip){ 
    24     $id=$bip->id; 
    25     $ip=$bip->ip_address; 
    26     $date=date("m-d-y",$bip->banned_date); 
    27     $reason=$bip->reason; 
    28      
    29      
    30     echo "<tr class='datarow'><td>$id</td><td>$ip</td><td>$date</td><td>$reason</td><td align='center'>"; 
    31     echo "<form method='post'><input type='hidden' name='action' value='unban_ip' /><input type='hidden' name='banned_id' value='$id' /><input type='submit' class='button-secondary' value='Unban IP' /></form>"; 
    32     echo "</td></tr>"; 
     24if($bannedips){ 
     25    foreach($bannedips as $bip){ 
     26        $id=$bip->id; 
     27        $ip=$bip->ip_address; 
     28        $date=date("m-d-y",$bip->banned_date); 
     29        $reason=$bip->reason; 
     30         
     31         
     32        echo "<tr><td>$id</td><td>$ip</td><td>$date</td><td>$reason</td><td align='center'>"; 
     33        echo "<form method='post'><input type='hidden' name='action' value='unban_ip' /><input type='hidden' name='banned_id' value='$id' /><input type='submit' class='button-secondary' value='Unban' /></form>"; 
     34        echo "</td></tr>"; 
     35    } 
     36}else{ 
     37    echo "<tr><td colspan='5'>There are currently no banned ip addresses.</td></tr>"; 
    3338} 
    3439 
  • praybox/trunk/inc/inc_pb_request_list_active_page.php

    r722104 r995527  
    66<div class="wrap"> 
    77<h2 class="logo-title">PrayBox Active Prayer Request List</h2> 
     8<div id="pbx-wrap"> 
    89 
    910<?php include("edit_request_form.php"); ?> 
     
    5455<h3>Active Prayer Requests</h3> 
    5556 
    56 <table class="gdadmin"> 
    57 <tr class="headrow"><td>ID</td><td>First/Last/Email</td><td width="250">Prayer Request</td><td>IP</td><td>Posted</td><td># Prayers</td><td>&nbsp;</td></tr> 
     57<table class="pbx-data"> 
     58<tr><th>ID</th><th>First/Last/Email</th><th width="250">Prayer Request</th><th>IP</th><th>Posted</th><th># Prayers</th><th>&nbsp;</th></tr> 
    5859 
    5960<?php 
     
    6263</table> 
    6364</div> 
     65</div> 
    6466<?php } 
  • praybox/trunk/inc/inc_pb_request_list_archived_page.php

    r585375 r995527  
    66 
    77<div class="wrap"> 
    8 <h2>PrayBox Archived Prayer Request List</h2> 
     8<h2 class="logo-title">PrayBox Archived Prayer Request List</h2> 
     9<div id="pbx-wrap"> 
    910 
    1011<p>In future updates, we hope to provide further tools for managing archives.</p> 
     
    1213<h3>Archived Prayer Requests</h3> 
    1314 
    14 <table class="gdadmin"> 
    15 <tr class="headrow"><td>ID</td><td>First/Last/Email</td><td width="250">Prayer Request</td><td>IP</td><td>Posted</td><td># Prayers</td><td>&nbsp;</td></tr> 
     15<table class="pbx-data"> 
     16<tr><th>ID</th><th>First/Last/Email</th><th width="250">Prayer Request</th><th>IP</th><th>Posted</th><th># Prayers</th><th>&nbsp;</th></tr> 
    1617 
    1718<?php 
     
    2021</table> 
    2122</div> 
     23</div> 
    2224<?php } 
  • praybox/trunk/inc/inc_pb_request_list_closed_page.php

    r722104 r995527  
    77<div class="wrap"> 
    88<h2 class="logo-title">PrayBox Closed Prayer Request List</h2> 
     9<div id="pbx-wrap"> 
    910<?php 
    1011if($_POST['action']=="remove_request"){ 
     
    3536<h3>Closed Prayer Requests</h3> 
    3637 
    37 <table class="gdadmin"> 
    38 <tr class="headrow"><td>ID</td><td>First/Last/Email</td><td width="250">Prayer Request</td><td>IP</td><td>Posted</td><td># Prayers</td><td>&nbsp;</td></tr> 
     38<table class="pbx-data"> 
     39<tr><th>ID</th><th>First/Last/Email</th><th width="250">Prayer Request</th><th>IP</th><th>Posted</th><th># Prayers</th><th>&nbsp;</th></tr> 
    3940 
    4041<?php 
     
    4344</table> 
    4445</div> 
     46</div> 
    4547<?php } 
  • praybox/trunk/inc/inc_pb_request_list_flagged_page.php

    r722104 r995527  
    66<div class="wrap"> 
    77<h2 class="logo-title">PrayBox Flagged Prayer Requests</h2> 
     8<div id="pbx-wrap"> 
    89 
    910<?php 
     
    3637<?php } ?> 
    3738 
    38 <table class="gdadmin"> 
    39 <tr class="headrow"><td>ID</td><td>First/Last/Email</td><td>Title</td><td width="300">Body</td><td>IP Address</td><td>Date Posted</td><td># Times Flagged</td><td>&nbsp;</td></tr> 
     39<table class="pbx-data"> 
     40<tr><th>ID</th><th>First/Last/Email</th><th>Title</th><th width="300">Body</th><th>IP Address</th><th>Date Posted</th><th># Times Flagged</th><th>&nbsp;</th></tr> 
    4041 
    4142<?php 
    4243$flags=$wpdb->get_results("SELECT request_id FROM ".$wpdb->prefix."pb_flags GROUP BY request_id"); 
    4344 
    44 foreach($flags as $flag){ 
    45     $req_id=$flag->request_id; 
    46     $num_flags=howManyFlags($req_id); 
    47      
    48     $request=$wpdb->get_row("SELECT first_name,last_name,email,title,body,ip_address,submitted FROM ".$wpdb->prefix."pb_requests WHERE id='$req_id'"); 
    49      
    50     $first_name=$request->first_name; 
    51     $last_name=$request->last_name; 
    52     $email=$request->email; 
    53     $title=stripslashes($request->title); 
    54     $body=prePgphOutput($request->body); 
    55     $ip=$request->ip_address; 
    56     $submitted=date("m-d-y",$request->submitted); 
    57      
    58     echo "<tr class='datarow'><td>$req_id</td><td>$first_name $last_name<br />$email</td><td>$title</td><td>$body</td><td>$ip</td><td>$submitted</td><td>$num_flags</td><td align='center'>"; 
    59     echo "<form method='post'><input type='hidden' name='action' value='remove_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Remove Request' /></form>"; 
    60     echo "<form method='post'><input type='hidden' name='action' value='clear_flags' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Clear Flags' /></form>"; 
    61     echo "<form method='post'><input type='hidden' name='action' value='remove_ban' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='hidden' name='pb_ip_address' value='$ip' /><input type='submit' class='button-secondary' value='Remove and Ban IP' /></form>"; 
    62     echo "</td></tr>"; 
     45if($flags){ 
     46    foreach($flags as $flag){ 
     47        $req_id=$flag->request_id; 
     48        $num_flags=howManyFlags($req_id); 
     49         
     50        $request=$wpdb->get_row("SELECT first_name,last_name,email,title,body,ip_address,submitted FROM ".$wpdb->prefix."pb_requests WHERE id='$req_id'"); 
     51         
     52        $first_name=$request->first_name; 
     53        $last_name=$request->last_name; 
     54        $email=$request->email; 
     55        $title=stripslashes($request->title); 
     56        $body=prePgphOutput($request->body); 
     57        $ip=$request->ip_address; 
     58        $submitted=date("m-d-y",$request->submitted); 
     59         
     60        echo "<tr><td>$req_id</td><td>$first_name $last_name<br />$email</td><td>$title</td><td>$body</td><td>$ip</td><td>$submitted</td><td>$num_flags</td><td align='center'>"; 
     61        echo "<form method='post'><input type='hidden' name='action' value='remove_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Remove' /></form>"; 
     62        echo "<form method='post'><input type='hidden' name='action' value='clear_flags' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' class='button-secondary' value='Clear Flags' /></form>"; 
     63        echo "<form method='post'><input type='hidden' name='action' value='remove_ban' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='hidden' name='pb_ip_address' value='$ip' /><input type='submit' class='button-secondary' value='Remove/Ban' /></form>"; 
     64        echo "</td></tr>"; 
     65    } 
     66}else{ 
     67    echo "<tr><td colspan='8'>There are currently no flagged prayer requests.</td></tr>"; 
    6368} 
    6469 
     
    6671</table> 
    6772</div> 
     73</div> 
    6874<?php } 
  • praybox/trunk/inc/inc_pb_settings_page.php

    r722104 r995527  
    11<?php 
    22function pb_settings_page() { 
    3 if(get_option('pb_admin_moderation')==""){$needupdate=1;} 
     3$needupdate=(get_option('pb_admin_moderation')=="")? 1 : 0; 
    44?> 
    55 
    66<div class="wrap"> 
    77<h2 class="logo-title">PrayBox General Settings</h2> 
    8  
     8<div id="pbx-wrap"> 
    99<?php 
    1010 if( isset($_POST['update']) && $_POST['update'] == 'Y' ) { 
     
    1616    } 
    1717?> 
    18 <p><strong><?php _e('settings saved.','menu-test'); ?></strong></p> 
     18<p class="pbx-alert"><?php _e('settings saved.','menu-test'); ?></p> 
    1919<?php }  
    2020 
    21  if($_POST['action']=="praybox_update"){ 
     21 if(isset($_POST['action']) && $_POST['action']=="praybox_update"){ 
    2222    updateOptionsAlpha(); 
    2323?> 
    24 <p><strong><?php _e('PrayBox Plugin Options Updated. <a href="?page=pb_settings">Click here to reload the PrayBox interface.</a>','menu-test'); ?></strong></p> 
     24<p class="pbx-alert"><?php _e('PrayBox Plugin Options Updated. <a href="?page=pb_settings">Click here to reload the PrayBox interface.</a>','menu-test'); ?></p> 
    2525<?php } else {  
    2626 
     
    3434<?php } ?> 
    3535 
    36 <p>Before using this plugin, make sure the correct information is listed in the fields below and paste the following shortcodes into the appropriate pages as indicated below:</p> 
     36    <div class="pbx-well"> 
     37    <p>Before using this plugin, make sure the correct information is listed in the fields below and paste the following shortcodes into the appropriate pages as indicated below:</p> 
     38     
     39    <ul> 
     40        <li>Paste this shortcode into the page you would like to use to display your listings: [pb-requests]</li> 
     41        <li>Paste this shortcode into the page you would like to use to display your submission form: [pb-forms]</li> 
     42        <li>IMPORTANT: Make sure you tell the plugin where you placed the [pb-forms] shortcode by selecting that page from the list beside "Prayer Request Form Page" below</li> 
     43    </ul> 
     44     
     45    <p>Have fun using this plugin and if you have any questions, requests, or positive feedback, we would love to hear from you at <a href="http://www.blazingtorch.com/" target="_blank">www.blazingtorch.com</a>.  We are constantly making updates to this plugin and looking for opportunities to develop new applications, so please do not hesitate to <a href="http://www.blazingtorch.com/contact/" target="_blank">contact us</a>.</p> 
     46    </div> 
    3747 
    38 <ul style="list-style-type:disc; margin-left: 30px;"> 
    39     <li>Paste this shortcode into the page you would like to use to display your listings: [pb-requests]</li> 
    40     <li>Paste this shortcode into the page you would like to use to display your submission form: [pb-forms]</li> 
    41     <li>IMPORTANT: Make sure you tell the plugin where you placed the [pb-forms] shortcode by selecting that page from the list beside "Prayer Request Form Page" below</li> 
    42 </ul> 
    4348 
    44 <p>Have fun using this plugin and if you have any questions, requests, or positive feedback, we would love to hear from you at <a href="http://www.blazingtorch.com/" target="_blank">www.blazingtorch.com</a>.  We are constantly making updates to this plugin and looking for opportunities to develop new applications, so please do not hesitate to <a href="http://www.blazingtorch.com/contact/" target="_blank">contact us</a>.</p> 
     49    <div id="pbx-main"> 
     50         
     51        <form method="post" action=""> 
     52            <input type="hidden" name="update" value="Y" /> 
     53         
     54            <div class="formfield"> 
     55                <label>Flag Threshhold</label> 
     56                <div class="formelement"> 
     57                <p>How many times do you want a prayer request listing to be flagged before it is hidden from public?</p> 
     58                <input type="number" name="pb_flag_threshhold" value="<?php echo get_option('pb_flag_threshhold'); ?>" /> <em>(enter '0' to disable this feature)</em> 
     59                </div> 
     60            </div> 
     61             
     62            <div class="formfield"> 
     63                <label>Request Form Intro Text</label> 
     64                <div class="formelement"> 
     65                    <p>This message is displayed above the form that allows people to submit their prayer requests.</p> 
     66                    <textarea  name="pb_request_form_intro" ><?php echo get_option('pb_request_form_intro'); ?></textarea> 
     67                </div> 
     68            </div> 
     69     
     70            <div class="formfield"> 
     71                <label>Request List Intro Text</label> 
     72                <div class="formelement"> 
     73                    <p>This message is displayed above the list of active prayer requests.</p> 
     74                    <textarea  name="pb_request_list_intro" ><?php echo get_option('pb_request_list_intro'); ?></textarea> 
     75                </div> 
     76            </div> 
     77     
     78            <div class="formfield"> 
     79                <label>Prayer Request Form Page</label> 
     80                <div class="formelement"> 
     81                   <?php 
     82                   $pb_currently_selected_page=get_option('pb_management_page'); 
     83                   wp_dropdown_pages(array('selected'=>$pb_currently_selected_page,'name'=>'pb_management_page')); 
     84                   ?> 
     85                   <p>NOTE: The following shortcode MUST be pasted into the "Prayer Request Form Page" in order for people who have posted prayer requests to close their requests or submit praise reports.</p> 
     86                   <p>[pb-forms]</p> 
     87                </div> 
     88            </div> 
     89     
     90            <div class="formfield"> 
     91                <label>Daily Email Subject</label> 
     92                <div class="formelement"><input type="text" name="pb_email_subject" value="<?php echo get_option('pb_email_subject'); ?>"  /></div> 
     93            </div> 
     94              
     95            <div class="formfield"> 
     96                <label>Daily Email Reply-To Email Address</label> 
     97                <div class="formelement"><input type="email" name="pb_reply_to_email" value="<?php echo get_option('pb_reply_to_email'); ?>"  /></div> 
     98            </div> 
     99             
     100            <div class="formfield"> 
     101                <label>Daily Email Greeting/Prefix</label> 
     102                <div class="formelement"> 
     103                    <p>The portion of the email that precedes the information notifying the requestor how many times they have been prayed for that day.</p> 
     104                    <textarea  name="pb_email_prefix" ><?php echo get_option('pb_email_prefix'); ?></textarea> 
     105                </div> 
     106            </div> 
     107     
     108            <div class="formfield"> 
     109                <label>Daily Email Closing/Suffix</label> 
     110                <div class="formelement"> 
     111                    <p>The portion of the email that follows the information notifying the requestor how many times they have been prayed for that day.</p> 
     112                    <textarea  name="pb_email_suffix" ><?php echo get_option('pb_email_suffix'); ?></textarea> 
     113                </div> 
     114            </div> 
     115     
     116            <div class="formfield"> 
     117                <label>Initial Prayer Gap</label> 
     118                <div class="formelement"> 
     119                <p>How many hours do you want a new prayer request to sit and not be prayed for before you are notified?</p> 
     120                <input type="number" name="pb_send_notify_hours" value="<?php echo get_option('pb_send_notify_hours'); ?>" /> <em>(enter '0' to disable this feature)</em> 
     121                </div> 
     122            </div> 
     123     
     124            <div class="formfield"> 
     125                <label>Prayer Gap Alert Email</label> 
     126                <div class="formelement"><input type="email" name="pb_send_notify_email" value="<?php echo get_option('pb_send_notify_email'); ?>" /></div> 
     127            </div> 
     128         
     129             
     130            <div class="formfield"> 
     131                <div class="formelement submit"> 
     132                <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" /> 
     133                </div> 
     134            </div> 
     135             
     136        </form> 
     137    </div> 
    45138 
    46 <div style="float:left; width:70%;"> 
    47 <div class="postbox"> 
    48 <form method="post" action=""> 
    49     <input type="hidden" name="update" value="Y" /> 
     139    <div id="pbx-sidebar"> 
     140        <h3>Do You Enjoy Using PrayBox?</h3> 
     141        <p>The development of this plugin has been and will continue to be a labor of love. It's one of those projects that we'd like to put more time into than we actually have available, adding features to PrayBox and building more web-based tools for churches and ministries.</p> 
     142        <p><strong>If you like PrayBox, please consider giving us a 5-star rating on the WordPress Plugins directory by <a href="http://wordpress.org/support/view/plugin-reviews/praybox?rate=5#postform" target="_blank">clicking here</a>!</strong></p> 
     143        <div class="pbx-featured"> 
     144            <h3>Upgrade to PrayBox+</h3> 
     145            <p>Purchase PrayBox+, a premium paid version of PrayBox with advanced features, such as:</p> 
     146            <ul> 
     147                <li>Admins have the option to moderate and edit requests before they appear publicly</li> 
     148                <li>Admins can edit active requests</li> 
     149                <li>Users can edit their own prayer requests</li> 
     150                <li>Users can close their requests and add praise report notes</li> 
     151                <li>Ability to link directly to individual prayer requests</li> 
     152                <li>Enhanced spam protection</li> 
     153                <li>Prayer requests can be shown over multiple pages instead of all at once</li> 
     154                <li>Admins can set the number of requests that show up per page</li> 
     155                <li>Ability to archive old requests</li> 
     156                <li>Premium support and free lifetime upgrades</li> 
     157            </ul> 
     158            <p>For just a few bucks, you can enjoy these advanced features and help us to keep moving forward with the development of this plugin and future church/ministry related tools. Thank you!</p> 
     159            <p><a href="http://www.blazingtorch.com/products/praybox-prayer-request-management/">Click here for more info or to upgrade to PrayBox+</a></p> 
     160        </div> 
     161    </div> 
    50162 
    51     <table class="form-table"> 
    52         <tr valign="top"> 
    53         <th scope="row">Flag Threshhold</th> 
    54         <td> 
    55         How many times do you want a prayer request listing to be flagged before it is hidden from public?<br /> 
    56         <input type="text" name="pb_flag_threshhold" value="<?php echo get_option('pb_flag_threshhold'); ?>" /> <em>(enter '0' to disable this feature)</em> 
    57         </td> 
    58         </tr> 
    59          
    60         <tr valign="top"> 
    61         <th scope="row">Request Form Intro Text</th> 
    62         <td> 
    63             This message is displayed above the form that allows people to submit their prayer requests.<br /> 
    64             <textarea  name="pb_request_form_intro" rows="3" cols="60"><?php echo get_option('pb_request_form_intro'); ?></textarea> 
    65         </td> 
    66         </tr> 
    67  
    68         <tr valign="top"> 
    69         <th scope="row">Request List Intro Text</th> 
    70         <td> 
    71             This message is displayed above the list of active prayer requests.<br /> 
    72             <textarea  name="pb_request_list_intro" rows="3" cols="60"><?php echo get_option('pb_request_list_intro'); ?></textarea> 
    73         </td> 
    74         </tr> 
    75  
    76         <tr valign="top"> 
    77         <th scope="row">Prayer Request Form Page</th> 
    78         <td> 
    79            <?php 
    80            $pb_currently_selected_page=get_option('pb_management_page'); 
    81            wp_dropdown_pages(array('selected'=>$pb_currently_selected_page,'name'=>'pb_management_page')); 
    82            ?> 
    83            <p>NOTE: The following shortcode MUST be pasted into the "Prayer Request Form Page" in order for people who have posted prayer requests to close their requests or submit praise reports.</p> 
    84            <p>[pb-forms]</p> 
    85         </td> 
    86         </tr> 
    87  
    88         <tr valign="top"> 
    89         <th scope="row">Daily Email Subject</th> 
    90         <td><input type="text" name="pb_email_subject" value="<?php echo get_option('pb_email_subject'); ?>" size="80" /></td> 
    91         </tr> 
    92           
    93         <tr valign="top"> 
    94         <th scope="row">Daily Email Reply-To Email Address</th> 
    95         <td><input type="text" name="pb_reply_to_email" value="<?php echo get_option('pb_reply_to_email'); ?>" size="80" /></td> 
    96         </tr> 
    97          
    98         <tr valign="top"> 
    99         <th scope="row">Daily Email Greeting/Prefix</th> 
    100         <td> 
    101             The portion of the email that precedes the information notifying the requestor how many times they have been prayed for that day.<br /> 
    102             <textarea  name="pb_email_prefix" rows="3" cols="60"><?php echo get_option('pb_email_prefix'); ?></textarea> 
    103         </td> 
    104         </tr> 
    105  
    106         <tr valign="top"> 
    107         <th scope="row">Daily Email Closing/Suffix</th> 
    108         <td> 
    109             The portion of the email that follows the information notifying the requestor how many times they have been prayed for that day.<br /> 
    110             <textarea  name="pb_email_suffix" rows="3" cols="60"><?php echo get_option('pb_email_suffix'); ?></textarea> 
    111         </td> 
    112         </tr> 
    113  
    114         <tr valign="top"> 
    115         <th scope="row">Initial Prayer Gap</th> 
    116         <td> 
    117         How many hours do you want a new prayer request to sit and not be prayed for before you are notified?<br /> 
    118         <input type="text" name="pb_send_notify_hours" value="<?php echo get_option('pb_send_notify_hours'); ?>" /> <em>(enter '0' to disable this feature)</em> 
    119         </td> 
    120         </tr> 
    121  
    122         <tr valign="top"> 
    123         <th scope="row">Prayer Gap Alert Email</th> 
    124         <td><input type="text" name="pb_send_notify_email" value="<?php echo get_option('pb_send_notify_email'); ?>" size="80" /></td> 
    125         </tr> 
    126  
    127     </table> 
    128      
    129     <p align="center" class="submit"> 
    130     <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" /> 
    131     </p> 
    132  
    133 </form> 
    134 <div style="clear:both;"></div></div> 
    135 <div style="clear:both;"></div></div> 
    136  
    137 <div class="rightcol"> 
    138 <div class="postbox smallbottmargin"> 
    139 <h3>Do You Enjoy Using PrayBox?</h3> 
    140     <p>The development of this plugin has been and will continue to be a labor of love. It's one of those projects that we'd like to put more time into than we actually have available, adding features to PrayBox and building more web-based tools for churches and ministries.</p> 
    141     <p><strong>If you like PrayBox, please consider giving us a 5-star rating on the WordPress Plugins directory by <a href="http://wordpress.org/support/view/plugin-reviews/praybox?rate=5#postform" target="_blank">clicking here</a>!</strong></p> 
     163    <div id="pbx-footer"> 
     164    <p align="right">Prayer Gap emails set to run <em><?php echo wp_get_schedule('prayer_gap'); ?></em><br /> 
     165    Daily Emails set to run <em><?php echo wp_get_schedule('daily_emails'); ?></em></p> 
     166    </div> 
    142167</div> 
    143 <div class="postbox featured"> 
    144 <h3>Upgrade to PrayBox+</h3> 
    145     <p>Purchase PrayBox+, a premium paid version of PrayBox with advanced features, such as:</p> 
    146     <ul> 
    147         <li>Admins have the option to moderate and edit requests before they appear publicly</li> 
    148         <li>Admins can edit active requests</li> 
    149         <li>Users can edit their own prayer requests</li> 
    150         <li>Users can close their requests and add praise report notes</li> 
    151         <li>Ability to link directly to individual prayer requests</li> 
    152         <li>Enhanced spam protection</li> 
    153         <li>Prayer requests can be shown over multiple pages instead of all at once</li> 
    154         <li>Admins can set the number of requests that show up per page</li> 
    155         <li>Ability to archive old requests</li> 
    156         <li>Premium support and free lifetime upgrades</li> 
    157     </ul> 
    158     <p>For just a few bucks, you can enjoy these advanced features and help us to keep moving forward with the development of this plugin and future church/ministry related tools. Thank you!</p> 
    159     <p><a href="http://www.blazingtorch.com/products/praybox-prayer-request-management/">Click here for more info or to upgrade to PrayBox+</a></p> 
    160168</div> 
    161 <div style="clear:both;"></div></div> 
    162  
    163 <div style="float:left; width: 100%;"> 
    164 <p align="right">Prayer Gap emails set to run <em><?php echo wp_get_schedule('prayer_gap'); ?></em><br /> 
    165 Daily Emails set to run <em><?php echo wp_get_schedule('daily_emails'); ?></em></p> 
    166 <div style="clear:both;"></div></div> 
    167  
    168 <div style="clear:both;"></div></div> 
    169169<?php }} 
Note: See TracChangeset for help on using the changeset viewer.