WordPress.org

Plugin Directory

Changeset 1015672


Ignore:
Timestamp:
10/29/14 05:15:07 (3 years ago)
Author:
blazingtorch
Message:

PrayBox 1.3 - WP 4.0

Location:
praybox
Files:
27 added
12 edited

Legend:

Unmodified
Added
Removed
  • praybox/trunk/css/bt-praybox-admin.css

    r995527 r1015672  
    155155} 
    156156 
    157 /* 
    158 li.toplevel_page_pb_settings a div.wp-menu-image {background-image: url(/wp-content/plugins/praybox/images/favicon.png); background-position: 0px -28px !important;} 
    159 li.toplevel_page_pb_settings.wp-menu-open a div.wp-menu-image {background-position: left top !important;} 
    160  
    161 table.gdadmin {border-collapse: collapse; border-spacing: 0px; width: 100%;} 
    162 table.gdadmin tr.headrow td {padding: 4px 10px; background-color: #CCCCCC; font-size: 13px; font-weight: bold; border-spacing: 0px;} 
    163 table.gdadmin tr.datarow td {padding: 4px 10px; font-size: 12px; vertical-align: top; border-bottom: 1px dotted #CCCCCC;} 
    164  
    165 div.wrap div.rightcol {float:left; width: 25%; margin: 0 0 0 20px;} 
    166 div.wrap div.rightcol p {padding: 0px 10px;} 
    167 div.wrap div.rightcol li {margin-left: 30px; list-style: disc; font-weight: bold;} 
    168 div.wrap div.rightcol form {width: 120px; float: right;} 
    169  
    170 div.wrap div.rightcol div.postbox.smallbottmargin {margin-bottom: 5px;} 
    171 div.wrap div.rightcol div.postbox h3 {background-color: #cccccc; padding: 10px;} 
    172  
    173  
    174 .wrap form.update {width: 80%; margin: 10px auto; padding: 5px; background-color: #F0B2B2; border: 1px solid #CC0000; text-align: center;} 
    175 .wrap form.update p {font-weight: bold; color: #CC0000;} 
    176  
    177 */ 
  • praybox/trunk/css/bt-praybox-sc.css

    r995527 r1015672  
     1#praybox_wrapper, form.pbx-form, .pbx-formfield {width: 100%; margin: 0px; padding-bottom: 5px; box-sizing: border-box;} 
     2 
     3.pbx-formfield label {width: 30%; margin: 0; margin-right: 5%; box-sizing: border-box;} 
     4.pbx-formfield span {font-size: smaller;} 
     5.pbx-formfield input[type="text"] {width: 65%; margin: 0; box-sizing: border-box;} 
     6.pbx-formfield input[type="checkbox"] {width: auto; margin: 0; margin-right: 5%; box-sizing: border-box;} 
     7.pbx-formfield input[type="submit"] {float: right; width: auto; margin: 0; box-sizing: border-box;} 
     8.pbx-formfield textarea {width: 100%; margin: 0; box-sizing: border-box;} 
     9 
     10.pbx-formfield form.pbx-flag {float: left; width: auto; margin: 0; box-sizing: border-box;} 
     11.pbx-formfield form.pbx-prayed {float: right; width: auto; margin: 0; box-sizing: border-box;} 
     12 
     13 
     14table.pbx-req {width: 100%; margin-top: 5px; border-top: 1px dotted #ccc;} 
     15table.pbx-req th {font-weight: bold;} 
     16 
     17/* 
    118#praybox table.praybox {border: 0px !important; width: 100%;} 
    219#praybox table.praybox td {padding: 2px 8px !important;} 
     
    4057#praybox .pagination a:hover {background-color: #000000;} 
    4158 
    42  
     59*/ 
  • praybox/trunk/inc/edit_request_form.php

    r995527 r1015672  
    11<?php 
    2 if($_POST['action']=="edit_request"){ 
     2if(isset($_POST['action']) && $_POST['action']=="edit_request"){ 
    33    $req_id=$_POST['pb_request_id']; 
    44    $request=$wpdb->get_row("SELECT first_name,last_name,email,title,body,ip_address,submitted FROM ".$wpdb->prefix."pb_requests WHERE id='$req_id'"); 
  • praybox/trunk/inc/functions.php

    r995527 r1015672  
    5050} 
    5151 
    52 function getRequestList($status){ 
    53     //THIS FUNCTION IS FOR PENDING, ACTIVE, CLOSED, OR ARCHIVED PRAYER REQUESTS 
    54     if($status=="pending"){$querycond="WHERE active='0' AND closed='0'";} 
    55     if($status=="active"){$querycond="WHERE active='1'";} 
    56     if($status=="closed"){$querycond="WHERE active='2'";} 
    57     if($status=="archived"){$querycond="WHERE active='3'";} 
    58      
    59     global $wpdb; 
     52function getRequestList($status){ //THIS FUNCTION IS FOR PENDING, ACTIVE, CLOSED, OR ARCHIVED PRAYER REQUESTS 
     53    global $wpdb; 
     54    switch($status){ 
     55        case "pending": 
     56            $querycond="WHERE active=0 AND closed=0"; 
     57            break; 
     58        case "active": 
     59            $querycond="WHERE active=1"; 
     60            break; 
     61        case "closed": 
     62            $querycond="WHERE active=2"; 
     63            break; 
     64        case "archived": 
     65            $querycond="WHERE active=3"; 
     66            break; 
     67    } 
     68 
    6069    $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"); 
    61      
     70//  return "SELECT id,first_name,last_name,email,title,body,ip_address,submitted FROM ".$wpdb->prefix."pb_requests $querycond ORDER BY submitted DESC"; 
     71//  print_r($requests); 
     72    $output=""; 
     73/* 
     74    foreach($requests as $req){ 
     75        $output.="<p>".$req->id."</p>"; 
     76    } 
     77    return $output; 
     78    exit; 
     79*/ 
    6280    if($requests){ 
    6381        foreach($requests as $req){ 
     
    7290            $num_prayers=howManyPrayers($req_id); 
    7391             
    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>"; 
     92            $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>"; 
     93     
     94            switch($status){ 
     95                case "pending": 
     96                    $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='".PB_ADMIN_APPROVE."' /></form>"; 
     97                    $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='".PB_ADMIN_EDIT."' /></form>"; 
     98                    $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='".PB_ADMIN_DELETE."' /></form>"; 
     99                    $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='".PB_ADMIN_BAN."' /></form>"; 
     100                    break; 
     101                case "active": 
     102                    $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='".PB_ADMIN_REMOVE."' /></form>"; 
     103                    $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='".PB_ADMIN_CLOSE."' /></form>"; 
     104                    $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='".PB_ADMIN_BAN."' /></form>"; 
     105                    break; 
     106                case "closed": 
     107                    $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='".PB_ADMIN_REMOVE."' /></form>"; 
     108                    $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='".PB_ADMIN_REOPEN."' /></form>"; 
     109                    break; 
    81110            } 
    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              
    94111            $output.="</td></tr>"; 
    95112        } 
    96113    }else{ 
    97         $output="<tr><td colspan='7'>There are currently no $status prayer requests.</td></tr>"; 
     114        $output="<tr><td colspan='7'>".PB_ADMIN_CURRENTLY." $status ".PB_ADMIN_PRAYER_REQ.".</td></tr>"; 
    98115    } 
    99116    return $output; 
     
    112129    $listingsperpage=get_option('pb_page_display'); 
    113130     
    114     if($listingsperpage!=0){$page_condition="LIMIT ".($page-1)*$listingsperpage.",".$page*$listingsperpage;} 
     131    $page_condition=($listingsperpage!=0)? "LIMIT ".($page-1)*$listingsperpage.",".$page*$listingsperpage : ""; 
    115132     
    116133    $this_display_qry_from="FROM ".$wpdb->prefix."pb_requests WHERE active='1' $time_condition ORDER BY submitted DESC $page_condition"; 
     
    121138    $total_num_requests=count($wpdb->get_results("SELECT id $total_display_qry_from")); 
    122139         
    123     $req_list_output.="<div id='praybox'>"; 
    124     $req_list_output.="<div class='intro'>".get_option('pb_request_list_intro')."<div style='clear:both;'></div></div>"; 
    125      
     140    $req_list_output="<div id='praybox_wrapper'>"; 
     141    $req_list_output.="<p class='pbx-text'>".get_option('pb_request_list_intro')."</p>"; 
     142     
     143    if($listingsperpage!=0){ 
     144        $total_pages=ceil($total_num_requests/$listingsperpage); 
     145        if($total_pages!=1){ 
     146        $i=1; 
     147        $req_list_output.="<div class='pagination'>".PB_ADMIN_PAGE.": "; 
     148        while($i<=$total_pages){ 
     149            if($page==$i){$linkclass=" class='active'";}else{$linkclass="";} 
     150            $req_list_output.=" <a href='$link"."page=$i' $linkclass>$i</a>"; 
     151        $i++; 
     152        } 
     153        $req_list_output.="</div>"; 
     154        } 
     155    } 
     156     
     157    $req_list_output.="<table class='pbx-req'>"; 
     158    $req_list_output.="<tr><th>".PB_REQ_TITLE."</th><th>".PB_REQ_NUM_PRAYERS."</th><th>".PB_REQ_SUBMITTED_ON."</th><th>&nbsp;</th>"; 
     159     
     160    foreach($active_requests as $a_req){ 
     161        $req_id=$a_req->id; 
     162        $title=stripslashes($a_req->title); 
     163        if($a_req->title!=""){$title=stripslashes($a_req->title);}else{$title="<em>".PB_REQ_UNTITLED."</em>";} 
     164        $body=stripslashes($a_req->body); 
     165        $submitted=date("F j, Y",$a_req->submitted); 
     166        $num_prayers=howManyPrayers($req_id); 
     167        $num_flags=howManyFlags($req_id); 
     168         
     169        if($flag_thresh!=0){$flag_ratio=$num_flags/$flag_thresh;}else{$flag_ratio=0;} 
     170         
     171        if($flag_ratio<1){ 
     172        $req_list_output.="<tr><td>$title</td><td>$num_prayers</td><td>$submitted</td><td>"; 
     173        $req_list_output.="<a href='$link"."req=$req_id'>".PB_REQ_DETAILS."</a>"; 
     174        $req_list_output.="</td></tr>"; 
     175        } 
     176    } 
     177    $req_list_output.="</table>"; 
     178 
    126179    if($listingsperpage!=0){ 
    127180        $total_pages=ceil($total_num_requests/$listingsperpage); 
     
    137190        } 
    138191    } 
    139      
    140     $req_list_output.="<table class='praybox'>"; 
    141     $req_list_output.="<tr class='pb-titlerow'><td>Request Title</td><td># Prayers</td><td>Submitted On</td><td>&nbsp;</td>"; 
    142      
    143     foreach($active_requests as $a_req){ 
    144         $req_id=$a_req->id; 
    145         $title=stripslashes($a_req->title); 
    146         if($a_req->title!=""){$title=stripslashes($a_req->title);}else{$title="<em>Untitled</em>";} 
    147         $body=stripslashes($a_req->body); 
    148         $submitted=date("F j, Y",$a_req->submitted); 
    149         $num_prayers=howManyPrayers($req_id); 
    150         $num_flags=howManyFlags($req_id); 
    151          
    152         if($flag_thresh!=0){$flag_ratio=$num_flags/$flag_thresh;}else{$flag_ratio=0;} 
    153          
    154         if($flag_ratio<1){ 
    155         $req_list_output.="<tr class='pb-datarow'><td>$title</td><td>$num_prayers</td><td>$submitted</td><td class='input'>"; 
    156         $req_list_output.="<a href='$link"."req=$req_id'>View Details</a>"; 
    157         $req_list_output.="</td></tr>"; 
    158         } 
    159     } 
    160     $req_list_output.="</table>"; 
    161  
    162     if($listingsperpage!=0){ 
    163         $total_pages=ceil($total_num_requests/$listingsperpage); 
    164         if($total_pages!=1){ 
    165         $i=1; 
    166         $req_list_output.="<div class='pagination'>Page: "; 
    167         while($i<=$total_pages){ 
    168             if($page==$i){$linkclass=" class='active'";}else{$linkclass="";} 
    169             $req_list_output.=" <a href='$link"."page=$i' $linkclass>$i</a>"; 
    170         $i++; 
    171         } 
    172         $req_list_output.="</div>"; 
    173         } 
    174     } 
    175  
    176     $req_list_output.="<div style='clear:both;'></div></div>"; 
     192 
     193    $req_list_output.="</div>"; 
    177194 
    178195    return $req_list_output; 
  • praybox/trunk/inc/inc_display_pb_forms.php

    r995527 r1015672  
    22function display_pb_forms($atts) { 
    33    global $wpdb; 
    4  
    54 
    65if(isset($_POST['action']) && $_POST['action']=="update_request"){ 
     
    1817    } 
    1918 
     19    $updated_title=(isset($closed))? PB_REQ_CLOSED_TITLE : PB_REQ_UPDATED_TITLE; 
     20    $updated_msg=(isset($closed))? PB_REQ_CLOSED_MSG : PB_REQ_UPDATED_MSG; 
    2021     
    21     if(!isset($closed)){ 
    22         $updated_request_output="<div id='praybox'>"; 
    23         $updated_request_output.="<div class='title'>Your Prayer Request Has Been Updated<div style='clear:both;'></div></div>"; 
    24         $updated_request_output.="<div class='intro'>Any changes that you have made to your prayer request have been updated.<div style='clear:both;'></div></div>"; 
    25         $updated_request_output.="<div style='clear:both;'></div></div>";    
    26     }else{ 
    27         $updated_request_output="<div id='praybox'>"; 
    28         $updated_request_output.="<div class='title'>Your Prayer Request Has Been Closed<div style='clear:both;'></div></div>"; 
    29         $updated_request_output.="<div class='intro'>You will no longer have access to edit this prayer request.<div style='clear:both;'></div></div>"; 
    30         $updated_request_output.="<div style='clear:both;'></div></div>";    
    31     } 
     22    $updated_request_output="<div id='praybox_wrapper'>"; 
     23    $updated_request_output.="<h2 class='pbx-title'>$updated_title</h2>"; 
     24    $updated_request_output.="<p class='pbx-text'>$updated_msg</p>"; 
     25    $updated_request_output.="</div>";   
    3226 
    33 return $updated_request_output; 
     27    return $updated_request_output; 
    3428 
    3529}elseif(isset($_POST['action']) && $_POST['action']=="submit_request"){ 
     
    5953         
    6054        $email_from=get_option('pb_reply_to_email'); 
    61         $email_subject="Prayer Request Posted"; 
    6255        $email_message=get_option('pb_email_prefix'); 
    63         $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"; 
     56        $email_message.="\n\n".PB_REQ_EMAIL_MSG1." $management_url\n\n".PB_REQ_EMAIL_MSG2."\n\n"; 
    6457        $email_message.=get_option('pb_email_suffix'); 
    6558        $headers= 'Reply-To:'.$site_name.' <'.$email_from.'>'."\r\n"; 
    6659        $headers.= 'From:'.$site_name.' <'.$email_from.'>'."\r\n"; 
    6760         
    68         wp_mail($email,$email_subject,$email_message,$headers); 
     61        wp_mail($email,PB_REQ_EMAIL_SUBJECT,$email_message,$headers); 
    6962 
    70         $submitted_output="<div id='praybox'>"; 
    71         $submitted_output.="<div class='title'>Your Prayer Request Has Been Submitted<div style='clear:both;'></div></div>"; 
    72         $submitted_output.="<div class='intro'>You will be receiving an email shortly that contains a link that will allow you to update your prayer request. If you have indicated that you would like to be notified when you are prayed for, you will receive an email once a day letting you know how many times your prayer request has been lifted up.<div style='clear:both;'></div></div>"; 
    73         $submitted_output.="<div style='clear:both;'></div></div>"; 
     63        $submitted_output="<div id='praybox_wrapper'>"; 
     64        $submitted_output.="<h2 class='pbx-title'>".PB_REQ_SUBMITTED_TITLE."</h2>"; 
     65        $submitted_output.="<p class='pbx-text'>".PB_REQ_SUBMITTED_MSG."</p>"; 
     66        $submitted_output.="</div>"; 
    7467 
    7568    }else{ 
    7669 
    77         $submitted_output="<div id='praybox'>"; 
    78         $submitted_output.="<div class='title'>Prayer Request Not Submitted<div style='clear:both;'></div></div>"; 
    79         $submitted_output.="<div class='intro'>Your prayer request submission has failed for the following reason(s):<ul>"; 
     70        $submitted_output="<div id='praybox_wrapper'>"; 
     71        $submitted_output.="<h2 class='pbx-title'>".PB_REQ_FAIL_TITLE."</h2>"; 
     72        $submitted_output.="<p class='pbx-text'>".PB_REQ_FAIL_MSG."</p><ul>"; 
     73 
    8074        if(isDuplicate($first_name,$last_name,$email,$title,$ip_address)=="fail"){ 
    81         $submitted_output.="<li>You have submitted an identical request and it is already listed.</li>"; 
     75            $submitted_output.="<li>".PB_REQ_FAIL_DUPLICATE."</li>"; 
    8276        } 
    8377        if($_POST['required']!=""){ 
    84         $submitted_output.="<li>You seem to be a spam bot.</li>"; 
     78            $submitted_output.="<li>".PB_REQ_FAIL_SPAM."</li>"; 
    8579        } 
    8680        if(isIPBanned($ip_address)=="fail"){ 
    87         $submitted_output.="<li>You are banned from using this resource.</li>"; 
     81            $submitted_output.="<li>".PB_REQ_FAIL_BANNED."</li>"; 
    8882        } 
    89         $submitted_output.="</ul><div style='clear:both;'></div></div>"; 
    90         $submitted_output.="<div style='clear:both;'></div></div>"; 
     83        $submitted_output.="</ul></div>"; 
    9184 
    9285    } 
    93          
    9486 
    95 return $submitted_output; 
     87    return $submitted_output; 
    9688 
    9789}else{ 
    9890 
    99 if(!isset($_GET['pbid']) || $_GET['pbid']==""){ 
     91    if(!isset($_GET['pbid']) || $_GET['pbid']==""){ 
     92        $stat=0; //new request 
     93        $anon=""; 
     94        $notify=""; 
     95         
     96        $sub_form_title=PB_FORM_TITLE; 
     97        $sub_form_msg=get_option('PB_REQ_form_intro'); 
     98        $sub_form_action="submit_request"; 
     99        $sub_form_req_id_input=""; 
     100        $sub_form_submit=PB_FORM_SUBMIT; 
     101     
     102    }else{ 
     103        $authcode=$_GET['pbid']; 
     104        if(isRequestActive($authcode)=="yes"){ 
     105            $prayer_request=$wpdb->get_row("SELECT id,first_name,last_name,anon,email,title,body,notify FROM ".$wpdb->prefix."pb_requests WHERE authcode='$authcode'"); 
     106             
     107            $stat=1; //open request 
     108            $anon=($prayer_request->anon==1)? "checked" : ""; 
     109            $notify=($prayer_request->notify==1)? "checked" : ""; 
     110     
     111            $sub_form_title=PB_FORM_EDIT_TITLE; 
     112            $sub_form_msg=PB_FORM_EDIT_MSG; 
     113            $sub_form_action="update_request"; 
     114            $sub_form_req_id_input="<input type='hidden' name='req_id' value='".$prayer_request->id."' />"; 
     115            $sub_form_submit=PB_FORM_EDIT_SUBMIT; 
     116        }else{ 
     117            $stat=2; //request is closed 
     118        } 
     119    } 
    100120 
    101 //INITIAL SUBMISSION FORM OUTPUT 
     121    $sub_form_output="<div id='praybox_wrapper'>"; 
    102122 
    103     $sub_form_output="<div id='praybox'>"; 
    104     $sub_form_output.="<div class='title'>Submit Your Prayer Request<div style='clear:both;'></div></div>"; 
    105     $sub_form_output.="<div class='intro'>".get_option('pb_request_form_intro')."<div style='clear:both;'></div></div>"; 
    106     $sub_form_output.="<form method='post'><input type='hidden' name='action' value='submit_request' />"; 
    107     $sub_form_output.="<table class='subform'>"; 
    108     $sub_form_output.="<tr><td class='label'>First Name:</td><td class='input'><input type='text' name='first_name' /></td></tr>"; 
    109     $sub_form_output.="<tr><td class='label'>Last Name:</td><td class='input'><input type='text' name='last_name' /></td></tr>"; 
    110     $sub_form_output.="<tr><td class='label'>&nbsp;</td><td class='checkbox'><input type='checkbox' name='anon' /> I would like to remain anonymous. Please do not post my name.</td></tr>"; 
    111     $sub_form_output.="<tr><td class='label'>Email Address:</td><td class='input'><input type='text' name='email' /></td></tr>"; 
    112     $sub_form_output.="<tr><td class='label'>Prayer Request Title:</td><td class='input'><input type='text' name='title' /></td></tr>"; 
    113     $sub_form_output.="<tr><td class='label'>Prayer Request:</td><td class='input'><textarea name='body'></textarea></td></tr>"; 
    114     $sub_form_output.="<tr><td class='label'>&nbsp;</td><td class='checkbox'><input type='checkbox' name='notify' /> I would like to be notified (once per day) when I have been prayed for.</td></tr>"; 
    115     $sub_form_output.="<tr><td class='submit' colspan='2'><input type='submit' value='Submit My Prayer Request' /></td></tr>"; 
    116     $sub_form_output.="</table>"; 
    117     $sub_form_output.="</form>"; 
    118     $sub_form_output.="<div style='clear:both;'></div></div>"; 
     123    if($stat==2){ 
     124        //CLOSED REQUEST OUTPUT 
     125        $sub_form_output.="<h2 class='pbx-title'>".PB_FORM_CLOSED_TITLE."</h2>"; 
     126        $sub_form_output.="<p class='pbx-text'>".PB_FORM_CLOSED_MSG."</p>"; 
     127    }else{ 
     128        //INITIAL SUBMISSION FORM OUTPUT 
     129        $sub_form_output.="<h2 class='pbx-title'>$sub_form_title</h2>"; 
     130        $sub_form_output.="<p class='pbx-text'>$sub_form_msg</p>"; 
     131        $sub_form_output.="<form class='pbx-form' method='post'><input type='hidden' name='action' value='$sub_form_action' />$sub_form_req_id_input"; 
     132        $sub_form_output.=($stat==0)? "<div class='pbx-formfield'><label>".PB_FORM_FIRST_NAME.":</label><input type='text' name='first_name' /></div>" : ""; 
     133        $sub_form_output.=($stat==0)? "<div class='pbx-formfield'><label>".PB_FORM_LAST_NAME.":</label><input type='text' name='last_name' /></div>" : ""; 
     134        $sub_form_output.="<div class='pbx-formfield'><input type='checkbox' name='anon' $anon /><span>".PB_FORM_ANONYMOUS."</span></div>"; 
     135        $sub_form_output.=($stat==0)? "<div class='pbx-formfield'><label>".PB_FORM_EMAIL.":</label><input type='text' name='email' /></div>" : ""; 
     136        $sub_form_output.=($stat==0)? "<div class='pbx-formfield'><label>".PB_FORM_REQTITLE.":</label><input type='text' name='title' /></div>" : ""; 
     137        $sub_form_output.=($stat==0)? "<div class='pbx-formfield'><label>".PB_FORM_REQ.":</label><textarea name='body'></textarea></div>" : ""; 
     138        $sub_form_output.="<div class='pbx-formfield'><input type='checkbox' name='notify' $notify /><span>".PB_FORM_NOTIFY."</span></div>"; 
     139        $sub_form_output.=($stat==1)? "<div class='pbx-formfield'><input type='checkbox' name='closed' /><span>".PB_FORM_EDIT_CLOSE."</span></div>" : ""; 
     140        $sub_form_output.="<div class='pbx-formfield'><input type='submit' value='$sub_form_submit' /></div>"; 
     141        $sub_form_output.="</form>"; 
     142    } 
     143 
     144    $sub_form_output.="</div>"; 
    119145 
    120146return $sub_form_output; 
     147 
     148/* 
    121149 
    122150}else{ 
     
    156184} 
    157185 
     186*/ 
     187 
    158188} 
    159189} 
  • praybox/trunk/inc/inc_display_pb_requests.php

    r585375 r1015672  
    1515    $last_name=stripslashes($prayer_request->last_name); 
    1616    $anon=$prayer_request->anon; 
    17     if($prayer_request->title!=""){$title=stripslashes($prayer_request->title);}else{$title="<em>Untitled</em>";} 
     17    if($prayer_request->title!=""){$title=stripslashes($prayer_request->title);}else{$title="<em>".PB_REQ_UNTITLED."</em>";} 
    1818    $body=prePgphOutput($prayer_request->body); 
    19     if($anon!=1){$display_name=$first_name." ".$last_name;}else{$display_name="<em>Anonymous</em>";} 
     19    if($anon!=1){$display_name=$first_name." ".$last_name;}else{$display_name="<em>".PB_REQ_ANONYMOUS."</em>";} 
    2020     
    21     $view_details_output="<div id='praybox'>"; 
    22     $view_details_output.="<div class='back'><a href='$permalink'><< Back to Request List</a><div style='clear:both;'></div></div>"; 
    23     $view_details_output.="<div class='title'>$title<div style='clear:both;'></div></div>"; 
    24     $view_details_output.="<table class='details'>"; 
    25     $view_details_output.="<tr><td class='label'>Submitted By:</td><td class='content'>$display_name"; 
    26     $view_details_output.="<form class='flag' method='post' action='$permalink'><input type='hidden' name='action' value='flag_this_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' value='Report Abuse' /></form>"; 
    27     $view_details_output.="</td></tr>"; 
    28     $view_details_output.="<tr><td class='label'>Prayer Request:</td><td class='content'>$body</td></tr>"; 
    29     $view_details_output.="<tr><td class='response' colspan='2'>"; 
    30     $view_details_output.="<form method='post' action='$permalink'><input type='hidden' name='action' value='prayed_for' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' value='I Prayed For You' /></form>"; 
    31     $view_details_output.="</td></tr>"; 
    32     $view_details_output.="</table>"; 
    33     $view_details_output.="<div style='clear:both;'></div></div>"; 
     21    $view_details_output="<div id='praybox_wrapper'>"; 
     22    $view_details_output.="<div class='pbx-link'><a href='$permalink'><< ".PB_LINK_BACK."</a></div>"; 
     23    $view_details_output.="<h2 class='pbx-title'>$title</h2>"; 
     24 
     25    $view_details_output.="<div class='pbx-formfield'><label>".PB_REQ_SUBMITTED_BY.":</label>$display_name</div>"; 
     26    $view_details_output.="<div class='pbx-formfield'><label>".PB_REQ_REQUEST.":</label>$body</div>"; 
     27    $view_details_output.="<div class='pbx-formfield'><form class='pbx-flag' method='post' action='$permalink'><input type='hidden' name='action' value='flag_this_request' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' value='".PB_FLAG_ABUSE."' /></form>"; 
     28    $view_details_output.="<form class='pbx-prayed' method='post' action='$permalink'><input type='hidden' name='action' value='prayed_for' /><input type='hidden' name='pb_request_id' value='$req_id' /><input type='submit' value='".PB_FLAG_PRAYED."' /></form></div>"; 
     29    $view_details_output.="</div>"; 
    3430 
    3531return $view_details_output; 
    3632 
    37 }elseif($_POST['action']=="flag_this_request"){ 
     33}elseif(isset($_POST['action']) && $_POST['action']=="flag_this_request"){ 
    3834 
    3935//PRAYED FOR INSERT SCRIPT AND CONTENT 
     
    4339    $wpdb->insert($wpdb->prefix.'pb_flags',array('request_id'=>$req_id,'flagged_date'=>$time_now,'ip_address'=>$ip_address)); 
    4440 
    45     if(isIPBanned($ip_address)=="pass"){ 
    46         $flag_action_output="<div id='praybox'>"; 
    47         $flag_action_output.="<div class='back'><a href='$permalink'><< Back to Request List</a><div style='clear:both;'></div></div>"; 
    48         $flag_action_output.="<div class='thankyou'>Thank you for reporting inappropriate content.<div style='clear:both;'></div></div>"; 
    49         $flag_action_output.="<div style='clear:both;'></div></div>"; 
    50     }else{ 
    51         $flag_action_output="<div id='praybox'>"; 
    52         $flag_action_output.="<div class='back'><a href='$permalink'><< Back to Request List</a><div style='clear:both;'></div></div>"; 
    53         $flag_action_output.="<div class='thankyou'>Sorry, you're not allowed to do that.<div style='clear:both;'></div></div>"; 
    54         $flag_action_output.="<div style='clear:both;'></div></div>"; 
    55     } 
     41    $flag_msg=(isIPBanned($ip_address)=="pass")? PB_THANK_YOU_FLAGGER : PB_ILLEGAL_FLAGGER; 
     42 
     43    $flag_action_output="<div id='praybox_wrapper'>"; 
     44    $flag_action_output.="<div class='pbx-link'><a href='$permalink'><< ".PB_LINK_BACK."</a></div>"; 
     45    $flag_action_output.="<p class='pbx-text'>$flag_msg</p>"; 
     46    $flag_action_output.="</div>"; 
    5647     
    5748return $flag_action_output; 
    5849 
    59 }elseif($_POST['action']=="prayed_for"){ 
     50}elseif(isset($_POST['action']) && $_POST['action']=="prayed_for"){ 
    6051 
    6152//PRAYED FOR INSERT SCRIPT AND CONTENT 
     
    6556    $wpdb->insert($wpdb->prefix.'pb_prayedfor',array('request_id'=>$req_id,'prayedfor_date'=>$time_now,'ip_address'=>$ip_address)); 
    6657         
    67     $view_details_output="<div id='praybox'>"; 
    68     $view_details_output.="<div class='back'><a href='$permalink'><< Back to Request List</a><div style='clear:both;'></div></div>"; 
    69     $view_details_output.="<div class='thankyou'>Thank you for lifting up this request in prayer.<div style='clear:both;'></div></div>"; 
    70     $view_details_output.="<div style='clear:both;'></div></div>"; 
     58    $view_details_output="<div id='praybox_wrapper'>"; 
     59    $view_details_output.="<div class='pbx-link'><a href='$permalink'><< ".PB_LINK_BACK."</a></div>"; 
     60    $view_details_output.="<p class='pbx-text'>".PB_THANK_YOU_PRAYER."</p>"; 
     61    $view_details_output.="</div>"; 
    7162 
    7263return $view_details_output; 
  • praybox/trunk/inc/inc_pb_bannedips_page.php

    r995527 r1015672  
    99 
    1010<?php 
    11 if($_POST['action']=="unban_ip"){ 
     11if(isset($_POST['action']) && $_POST['action']=="unban_ip"){ 
    1212    $id=$_POST['banned_id']; 
    1313    $wpdb->query("DELETE FROM ".$wpdb->prefix."pb_banned_ips WHERE id='$id'"); 
     
    2929        $reason=$bip->reason; 
    3030         
    31          
    3231        echo "<tr><td>$id</td><td>$ip</td><td>$date</td><td>$reason</td><td align='center'>"; 
    3332        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>"; 
  • praybox/trunk/inc/inc_pb_request_list_active_page.php

    r995527 r1015672  
    55 
    66<div class="wrap"> 
    7 <h2 class="logo-title">PrayBox Active Prayer Request List</h2> 
     7<h2 class="logo-title"><?php echo PB_ADMIN_ACTIVE_PAGE_TITLE; ?></h2> 
    88<div id="pbx-wrap"> 
    99 
     
    1111 
    1212<?php 
    13 if($_POST['action']=="edit_request_exec"){ 
     13if(isset($_POST['action']) && $_POST['action']=="edit_request_exec"){ 
    1414    $req_id=$_POST['pb_request_id']; 
    1515    $first_name=$_POST['first_name']; 
     
    2424 
    2525<?php 
    26 if($_POST['action']=="remove_request"){ 
     26if(isset($_POST['action']) && $_POST['action']=="remove_request"){ 
    2727    $req_id=$_POST['pb_request_id']; 
    2828    $wpdb->query("DELETE FROM ".$wpdb->prefix."pb_requests WHERE id='$req_id'"); 
     
    3333 
    3434<?php 
    35 if($_POST['action']=="close_request"){ 
     35if(isset($_POST['action']) && $_POST['action']=="close_request"){ 
    3636    $req_id=$_POST['pb_request_id']; 
    3737    $time_now=time(); 
    3838    $wpdb->update($wpdb->prefix.'pb_requests',array('closed'=>$time_now,'closed_comment'=>'closed by administrator.','active'=>2),array('id'=>$req_id)); 
    3939?> 
    40 <p><strong><?php _e('Request Closed.','menu-test'); ?></strong></p> 
     40<p><strong><?php _e(PB_ADMIN_REQ_CLOSED,'menu-test'); ?></strong></p> 
    4141<?php } ?> 
    4242 
    4343<?php 
    44 if($_POST['action']=="remove_ban"){ 
     44if(isset($_POST['action']) && $_POST['action']=="remove_ban"){ 
    4545    $req_id=$_POST['pb_request_id']; 
    4646    $ip=$_POST['pb_ip_address']; 
  • praybox/trunk/inc/inc_pb_request_list_closed_page.php

    r995527 r1015672  
    99<div id="pbx-wrap"> 
    1010<?php 
    11 if($_POST['action']=="remove_request"){ 
     11if(isset($_POST['action']) && $_POST['action']=="remove_request"){ 
    1212    $req_id=$_POST['pb_request_id']; 
    1313    $wpdb->query("DELETE FROM ".$wpdb->prefix."pb_requests WHERE id='$req_id'"); 
     
    1818 
    1919<?php 
    20 if($_POST['action']=="reopen_request"){ 
     20if(isset($_POST['action']) && $_POST['action']=="reopen_request"){ 
    2121    $req_id=$_POST['pb_request_id']; 
    2222    $time_now=time(); 
     
    2727 
    2828<?php 
    29 if($_POST['action']=="archive_request"){ 
     29if(isset($_POST['action']) && $_POST['action']=="archive_request"){ 
    3030    $req_id=$_POST['pb_request_id']; 
    3131    $wpdb->update($wpdb->prefix.'pb_requests',array('active'=>3),array('id'=>$req_id)); 
  • praybox/trunk/inc/inc_pb_request_list_flagged_page.php

    r995527 r1015672  
    99 
    1010<?php 
    11 if($_POST['action']=="remove_request"){ 
     11if(isset($_POST['action']) && $_POST['action']=="remove_request"){ 
    1212    $req_id=$_POST['pb_request_id']; 
    1313    $wpdb->query("DELETE FROM ".$wpdb->prefix."pb_requests WHERE id='$req_id'"); 
     
    1818 
    1919<?php 
    20 if($_POST['action']=="clear_flags"){ 
     20if(isset($_POST['action']) && $_POST['action']=="clear_flags"){ 
    2121    $req_id=$_POST['pb_request_id']; 
    2222    $wpdb->query("DELETE FROM ".$wpdb->prefix."pb_flags WHERE request_id='$req_id'"); 
     
    2626 
    2727<?php 
    28 if($_POST['action']=="remove_ban"){ 
     28if(isset($_POST['action']) && $_POST['action']=="remove_ban"){ 
    2929    $req_id=$_POST['pb_request_id']; 
    3030    $ip=$_POST['pb_ip_address']; 
  • praybox/trunk/praybox.php

    r995519 r1015672  
    44Plugin URI: http://www.praybox.com/ 
    55Description: PrayBox is being used to manage prayer requests on WordPress websites all over the world. 
    6 Version: 1.2 
     6Version: 1.3 
    77Author: Bryan Haddock 
    88Author URI: http://www.blazingtorch.com 
     
    2424    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
    2525*/ 
     26include("inc/pb_constants.php"); 
    2627include("inc/functions.php"); 
    2728 
  • praybox/trunk/readme.txt

    r995519 r1015672  
    55Requires at least: 3.0 
    66Tested up to: 4.0 
    7 Stable tag: 1.2 
     7Stable tag: 1.3 
    88 
    99PrayBox is being used to manage prayer requests on WordPress websites all over the world. 
     
    1717= Live PrayBox = 
    1818 
    19 View our working version of PrayBox, post a prayer request or pray for others here: [Praybox - Online Prayer Requests](http://www.praybox.com/) 
     19View my working version of PrayBox, post a prayer request or pray for others here: [Praybox - Online Prayer Requests](http://www.praybox.com/) 
    2020 
    2121= Want more features?  Upgrade to PrayBox+ = 
     
    2727= Support and Requests = 
    2828 
    29 We respond to all support requests sent in through our PrayBox contact form at: [PrayBox Support](http://www.blazingtorch.com/contact/) 
     29I respond to all support requests sent in through my PrayBox contact form at: [PrayBox Support](http://www.blazingtorch.com/contact/) 
    3030 
    3131== Installation == 
     
    101101* Updated admin interface. 
    102102* Fixed issues related to compatibility with WP 4.0 email function. 
     103 
     104= October 29, 2014 - 1.3 = 
     105* Began adding fundamental elements for multilingual improvements. 
     106* Fixed issue with "Active Request List" page not displaying all requests. 
     107* Updated shortcode output for better compatibility with more WP themes. 
Note: See TracChangeset for help on using the changeset viewer.