示例#1
0
文件: users.php 项目: Bakyenga/kyengs
 function process_form_data($urldata, $formdata, $action)
 {
     $query = '';
     # Determine what to do with the form data based on the action
     if ($action == 'delete') {
         $query = $this->Query_reader->get_query_by_code('deactivate_employee_record', array('id' => $urldata['id']));
     } else {
         if ($action == 'save') {
             # Before saving this data, add slashes so that bad additions and quotes are 'neutralised'
             $formdata = clean_form_data($formdata);
             # User is editing
             if (isset($formdata['editid']) && trim($formdata['editid']) != '') {
                 $query = $this->Query_reader->get_query_by_code('update_employee_record', $formdata);
             } else {
                 $previous_user_array = $this->Query_reader->get_row_as_array('pick_employee_by_email', array('emailaddress' => $formdata['emailaddress']));
                 # User data doesnt exist
                 if (count($previous_user_array) == 0) {
                     $result = $this->db->query($this->Query_reader->get_query_by_code('insert_employee_record', $formdata));
                     #Send the new user an email if their record was created successfully
                     if ($result) {
                         #Send user email so that they can confirm their email
                         $_POST['messageid'] = "AC" . strtotime('now');
                         $_POST['confirmationid'] = encryptValue("AC" . $this->db->insert_id());
                         $_POST['username'] = generate_user_details($this->db->insert_id(), 'username');
                         $_POST['password'] = generate_user_details($this->db->insert_id(), 'password');
                         $_POST['adminname'] = htmlentities($this->session->userdata('names'));
                         $result = $this->db->query($this->Query_reader->get_query_by_code('update_user_credentials', array_merge(array('userid' => $this->db->insert_id()), $_POST)));
                         echo "THIS QUERY: " . $this->Query_reader->get_query_by_code('update_user_credentials', array_merge(array('userid' => $this->db->insert_id()), $_POST));
                         $response = $this->emailhandler->send_email(array('admin' => 'FROM**ACRAV Website Administration**' . SITE_ADMIN_MAILID, 'user' => 'TO**' . $this->session->userdata('emailaddress') . ', ' . $_POST['emailaddress'] . ', ' . SITE_ADMIN_MAILID, 'user' => 'CC**' . $this->session->userdata('emailaddress')), $_POST, 'newcompanyuser');
                     }
                 }
             }
         }
     }
     if (!isset($result)) {
         $result = $this->db->query($query);
     }
     return $result;
 }
示例#2
0
 function load_form()
 {
     access_control($this);
     # Get the passed details into the url data array if any
     $urldata = $this->uri->uri_to_assoc(3, array('m', 'i', 'a'));
     # Pick all assigned data
     $data = assign_to_data($urldata);
     $this->session->set_userdata('local_allowed_extensions', array('.doc', '.docx', '.xls', '.xlsx', '.pdf'));
     #Eliminate editing messages
     if (!empty($data['i']) && empty($data['a'])) {
         $data['a'] = encryptValue('view');
     }
     #$data['r'] is for replying AND $data['i'] is for view only mode
     if (!empty($data['i']) && !empty($data['a']) && decryptValue($data['a']) == 'view' || !empty($data['r'])) {
         $readid = !empty($data['r']) ? decryptValue($data['r']) : decryptValue($data['i']);
         $data['formdata'] = $this->Query_reader->get_row_as_array('get_message_read_by_id', array('id' => $readid));
         #Mark message as read by this user and proceed to show if the message details are found
         if (!empty($data['formdata'])) {
             #User is just viewing the message
             if (empty($data['r'])) {
                 $data['isview'] = 'Y';
                 $result = $this->db->query($this->Query_reader->get_query_by_code('update_message_read_status', array('readip' => get_ip_address(), 'isread' => 'Y', 'id' => $readid)));
             } else {
                 $data['formdata']['subject'] = substr($data['formdata']['subject'], 0, 3) != "RE:" ? "RE: " . $data['formdata']['subject'] : $data['formdata']['subject'];
                 $data['formdata']['details'] = "\n\n\n\n\nOn " . date('m/d/Y h:iA', strtotime($data['formdata']['messagedate'])) . " " . $data['formdata']['sentbydetails'] . " wrote\n------------------------------------------\n" . reduce_string_by_chars($data['formdata']['details'], 500);
                 $this->session->set_userdata('exclusers', array($data['formdata']['sentby']));
             }
             $recipients = $this->db->query($this->Query_reader->get_query_by_code('get_recipients_list', array('msgid' => $data['formdata']['messageid'])));
             $data['recipients'] = $recipients->result_array();
         } else {
             $this->session->set_userdata('smsg', "WARNING: The message could not be loaded.");
             redirect(base_url() . "messages/load_inbox/m/smsg");
         }
     }
     $this->load->view('messages/send_message_view', $data);
 }
示例#3
0
文件: user.php 项目: nwtug/academia
 function add_user_to_group()
 {
     access_control($this);
     # Get the passed details into the url data array if any
     $urldata = $this->uri->uri_to_assoc(3, array('m', 'i'));
     # Pick all assigned data
     $data = assign_to_data($urldata);
     if (!empty($data['a']) && decryptValue($data['a']) == 'adduser') {
         $result = $this->db->query($this->Query_reader->get_query_by_code('add_user_to_group', array('groupname' => decryptValue($data['gn']), 'userid' => $data['adduserid'], 'isactive' => 'Y')));
         $data['msg'] = $result ? "The user has been added to the email group." : "ERROR: The user could not be added to the email group.";
         $userlist = $this->session->userdata('usergrouplist');
         array_push($userlist, $data['adduserid']);
         $this->session->set_userdata('usergrouplist', $userlist);
         $group = $this->db->query($this->Query_reader->get_query_by_code('get_group_by_name', array('groupname' => decryptValue($data['gn']))));
         $data['page_list'] = $group->result_array();
         $data['area'] = "user_email_group_list";
         $this->load->view('incl/addons', $data);
     } else {
         $data['gn'] = !empty($data['groupname']) ? encryptValue(restore_bad_chars($data['groupname'])) : $data['gn'];
         $data['area'] = "add_user_to_group";
         $this->load->view('incl/addons', $data);
     }
 }
示例#4
0
        echo encryptValue("company");
        ?>
&flag=<?php 
        echo encryptValue("dras");
        ?>
&truck_id=<?php 
        echo $truck['truck_id'];
        ?>
&assid=<?php 
        echo $row132['ID'];
        ?>
">Assign</a>]&nbsp;[<a href="dashboard.php?p=<?php 
        echo encryptValue("company");
        ?>
&flag=<?php 
        echo encryptValue("drhist");
        ?>
&truck_id=<?php 
        echo $truck['truck_id'];
        ?>
">View History</a>]</td>
            <td align="left"><div <?php 
        if (isset($truck['truck_id'])) {
            echo "class=\"editable_select\"";
        }
        ?>
  id="trucks|truck_id|systemstatus|<?php 
        echo $truck['truck_id'];
        ?>
"><?php 
        if (isset($truck['truck_id'])) {
示例#5
0
    do {
        $comp = mysql_fetch_assoc(mysql_query("SELECT * FROM companies Where ID = '" . $row['CompanyID'] . "'"));
        ?>
      <tr class="<?php 
        echo $row['ID'];
        ?>
" style="vertical-align:middle;">

                <td style="padding-left:8px;"><a href="dashboard.php?p=c2RpYg==&flag=<?php 
        echo encryptValue("vukampane");
        ?>
&token=<?php 
        echo encryptValue($row['CompanyID']);
        ?>
&boj=<?php 
        echo encryptValue($comp['Name']);
        ?>
" title="View Company details?"><?php 
        echo $comp['Name'];
        ?>
</a></td> 
            <td align="center"><?php 
        echo number_format($row['BidAmount']);
        ?>
</td>
            <td align="left"><a title="<b><u>FULL BID DETAILS</u></b><br/><?php 
        echo $row['Details'];
        ?>
" href="#"><?php 
        echo substr(nl2br(strip_tags($row['Details'])), 0, 30) . '.....';
        ?>
示例#6
0
        #total debit
        if ($row['cr_dr'] == 'CR') {
            $total_credit += $row['amount'];
        }
        #total credit
        if ($row['cr_dr'] == 'DR') {
            $total_debit += $row['amount'];
        }
        $balance = $total_credit - $total_debit;
        #Show one row at a time
        echo "<tr class='listrow' style='" . get_row_color($counter, 2) . "'>\r\r\n    <td class='leftListCell rightListCell' valign='top' nowrap>";
        #if(check_user_access($this,'delete_deal')){
        echo "<a href='javascript:void(0)' onclick=\"confirmDeleteEntity('" . base_url() . "finances/delete_transaction/i/" . encryptValue($row['transid']) . "', 'Are you sure you want to remove this fee? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.');\" title=\"Click to remove this fee.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>";
        #}
        #if(check_user_access($this,'update_deals')){
        echo " &nbsp;&nbsp; <a href='" . base_url() . "finances/load_transaction_form/i/" . encryptValue($row['transid']) . "' title=\"Click to edit this fee details.\"><img src='" . base_url() . "images/edit.png' border='0'/></a>";
        #}
        echo "</td>\t\t\r\r\n            <td valign='top'>" . date("j M, Y", GetTimeStamp($row['dateadded'])) . "</td>\t\t\r\r\n            <td valign='top'>" . $account_info['title'] . "</td>\r\r\n            <td valign='top'>" . $row['particulars'] . "</td>\t\t\t\t\r\r\n            <td valign='top' class='number_format' align='right' nowrap>" . ($row['cr_dr'] == 'DR' ? number_format($row['amount'], 0, '.', ',') : '') . "</td>\t\t\r\r\n            <td valign='top' class='number_format' align='right' nowrap>" . ($row['cr_dr'] == 'CR' ? number_format($row['amount'], 0, '.', ',') : '') . "</td>\r\r\n            <td class='rightListCell number_format' valign='top' align='right' nowrap>" . number_format($balance, 0, '.', ',') . "</td>\t\t\r\r\n        </tr>";
        $counter++;
    }
    echo "<tr>\r\r\n<td colspan='5' align='right'  class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "finances/manage_petty_cash_book/p/%d") . "</td>\r\r\n</tr>\r\r\n</table>";
} else {
    echo "<div>No transactions have been added.</div>";
}
?>

        
        
        </td>
        </tr>
      
示例#7
0
 function fetch_terms_ajax()
 {
     $school_id = $this->schoolinfo['id'];
     #GET SEGMENT
     $yearid = $this->uri->segment(3);
     #LOAD MODEL
     $this->load->model('marks_view');
     $year_array = $this->marks_view->fetchaterms($yearid, $school_id);
     $ary = "";
     foreach ($year_array as $term) {
         $ary .= $term['term'] . "@@" . encryptValue($term['id']) . "##";
     }
     echo $ary;
 }
示例#8
0
 
<h1>MANAGE MY FLEET</h1>
	
	My Fleet Manager</span>&nbsp;&nbsp;&nbsp;
      <input name="cancel4" type="button" id="cancel4" value="Add Vehicle" onClick="location.href='dashboard.php?p=<?php 
echo encryptValue("company");
?>
&flag=<?php 
echo encryptValue("compTruckz");
?>
'" class="button"/>
      <input name="cancel5" type="button" id="cancel5" value="View My Fleet" onClick="location.href='dashboard.php?p=<?php 
echo encryptValue("company");
?>
&flag=<?php 
echo encryptValue("vuTruckz");
?>
'" class="button"/>
    
      <?php 
session_start();
$id = $_GET['truck_id'];
$_SESSION['truck'] = $_GET['truck_id'];
$truck_id = $_SESSION['truck'];
$session_truck = $_SESSION['truck'];
$query3 = "SELECT * FROM trucks where truck_id='{$id}'";
$query2 = mysql_query($query3, $connect) or die(mysql_error());
$companytruckdetails = mysql_fetch_assoc($query2);
$companytruckdetail = mysql_num_rows($query2);
if (isset($companytruckdetails['truck_id'])) {
    $edit = "";
示例#9
0
                                     src="<?= base_url() ?>uploads/blogs/<?= get_thumbnail($row['cover_image']) ?>">
                            </a>


                        <?php

                        } else {
                            ?>
                            <img class="img-rounded" width="32px" height="32px"
                                 src="<?= base_url() ?>uploads/noimage.png">
                        <?php

                        }
                        ?>
                        <a style="padding-left: 10px;" class=""
                           href="<?= base_url() . $this->uri->segment(1) . '/' . $this->uri->segment(2) . '/change_cover/' . encryptValue($row['id']) ?>">change</a>
                    </td>


                </tr>
            <?php

            }
            ?>

            <?=$pages?>

            </tbody>
        </table>
        </div>
    </div><!--end .card-body -->
示例#10
0
                echo encryptValue($row['groupid']);
                ?>
" title="Click to update this access group."><img src="<?php 
                echo base_url();
                ?>
images/edit.png" border="0"/></a> 
						 <?php 
            }
            if (check_user_access($this, 'manage_access_permissions')) {
                ?>

						  <a href="<?php 
                echo base_url();
                ?>
admin/update_permissions/i/<?php 
                echo encryptValue($row['groupid']);
                ?>
" title="Click to update this access group's permissions"><img src="<?php 
                echo base_url();
                ?>
images/patient_history.png" border="0" height="18"/></a>
						  <?php 
            }
            ?>

                          
  
						</td>
						<?php 
        }
        ?>
示例#11
0
if (!empty($page_list)) {
    echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>\r\r\n          \t<tr>\r\r\n\t\t\t<td class='listheader' width='1%'>&nbsp;</td>\r\r\n           \t<td class='listheader' nowrap>User &nbsp;<a class='fancybox fancybox.ajax' href='" . base_url() . "user/load_staff_form')' title='Click to add a user'><img src='" . base_url() . "images/add_item.png' border='0'/></a></td>\r\r\n\t\t\t<td class='listheader' nowrap>Username</td>\r\r\n\t\t\t<td class='listheader' nowrap>Staff Group</td>\r\r\n           \t<td class='listheader' nowrap>Phone</td>\r\r\n\t\t\t<td class='listheader' nowrap>Email</td>\r\r\n\t\t\t<td class='listheader' nowrap>Date Added</td>\r\r\n\t\t\t</tr>";
    $counter = 0;
    foreach ($page_list as $row) {
        #User group details
        $usergroup = get_user_group_details($this, $row['usergroup']);
        if (empty($usergroup)) {
            $usergroup['groupname'] = '';
        }
        #Show one row at a time
        echo "<tr id='tr_" . $row['id'] . "' class='listrow' style='" . get_row_color($counter, 2) . "'>\r\r\n\t\t<td class='leftListCell rightListCell' valign='top' nowrap>";
        #if(check_user_access($this,'delete_deal')){
        echo "<a href='javascript:void(0)' onclick=\"asynchDelete('" . base_url() . "user/delete_staff/i/" . encryptValue($row['id']) . "', 'Are you sure you want to remove this user? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.', 'tr_" . $row['id'] . "');\" title=\"Click to remove this user.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>";
        #}
        #if(check_user_access($this,'update_deals')){
        echo " &nbsp;&nbsp; <a class='fancybox fancybox.ajax' href='" . base_url() . "user/load_staff_form/i/" . encryptValue($row['id']) . "' title=\"Click to edit this user details.\"><img src='" . base_url() . "images/edit.png' border='0'/></a>";
        #}
        echo "</td>\r\r\n\t\t\r\r\n\t\t<td valign='top'>" . ucwords(strtolower($row['firstname'] . " " . $row['lastname'])) . "</td>\t\t\r\r\n\t\t<td valign='top'>" . $row['username'] . "</td>\r\r\n\t\t<td valign='top'>" . check_empty_value($usergroup['groupname'], 'N/A') . "</td>\t\t\r\r\n\t\t<td valign='top' nowrap>" . $row['telephone'] . "</td>\t\t\r\r\n\t\t<td valign='top'>" . $row['emailaddress'] . "</td>\r\r\n\t\t<td valign='top' class='rightListCell'>" . date("j M, Y", GetTimeStamp($row['dateadded'])) . "</td>\t\t\r\r\n\t\t</tr>";
        $counter++;
    }
    echo "<tr>\r\r\n\t<td colspan='5' align='right'  class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "user/manage_staff/p/%d", 'results') . "</td>\r\r\n\t</tr>\r\r\n\t</table>";
} else {
    echo "<div>No users have been registered.</div";
}
?>

            
            </div>
            </td>
            </tr>
          
示例#12
0
                                <td>
                                    <?php
                                    if($row['imageurl']){
                                        ?>
                                        <a href="<?= base_url() . 'uploads/footer_link_logos/' . $row['imageurl'] ?>"
                                           class="fancybox" title="<?= $row['title'] ?>">
                                            <img class="img-circle" width="32px" height="32px"
                                                 src="<?= base_url() ?>uploads/footer_link_logos/<?= get_thumbnail($row['imageurl']) ?>">
                                        </a>
                                    <?php
                                    }
                                    ?>


                                    <a href="<?=base_url().$this->uri->segment(1).'/'.$this->uri->segment(2).'/footer_link_logo/'.encryptValue($row['id'])?>"><?=$row['imageurl']!==''?'update':'upload'?> Logo</a> </td>

                            </tr>
                        <?php
                        }


                        ?>


                        </tbody>
                    </table>
                </div>


            </div>
示例#13
0
        $CARGOHEIGHT = mysql_real_escape_string(trim($_POST["cargoheight"]));
    } else {
        $CARGOHEIGHT = "0";
    }
    //Insert the new cargo
    $sqlu = "INSERT INTO containers (JobID, containernumber,company_id,cargotype,description,instructions,originaddress,destinationaddress,origincountry,destinationcountry,cargoweight,cargolength,cargowidth,cargoheight) VALUES ('" . $_POST['jobid'] . "', '{$CONTAINERNUMBER}','" . $_SESSION['UserID'] . "','{$CARGOTYPE}','{$DESCRIPTION}','{$INSTRUCTIONS}','{$ORIGINADDRESS}','{$DESTINATIONADDRESS}','{$ORIGINCOUNTRY}','{$DESTINATIONCOUNTRY}','{$CARGOWEIGHT}','{$CARGOLENGTH}','{$CARGOWIDTH}','{$CARGOHEIGHT}')";
    $queryu = mysql_query($sqlu);
    if ($queryu) {
        session_start();
        $_SESSION['success'] = "sucess";
        header("Location: dashboard.php?p=" . encryptValue("company") . "&flag=" . encryptValue("compKurgo") . "");
    } else {
        session_start();
        $_SESSION['success'] = "sucess2";
        $_SESSION['mesog'] = "Sorry!, an internal system error happened, try again! " . mysql_error();
        header("Location: dashboard.php?p=" . encryptValue("company") . "&flag=" . encryptValue("compKurgo") . "");
    }
    exit;
}
//End of add cargo
//Check and add bid
if (isset($_REQUEST["b1d4w4k"]) && $_REQUEST["b1d4w4k"] == "true") {
    $amount = mysql_real_escape_string($_POST["amount"]);
    $details = mysql_real_escape_string($_POST["details"]);
    $bidowner = mysql_real_escape_string($_POST["bidowner"]);
    $bidid = mysql_real_escape_string($_POST["bidid"]);
    $job = mysql_real_escape_string($_POST["job"]);
    //Check the variables
    $c = true;
    $c = $c && strlen($amount) >= 4 ? true : false;
    if ($c == false) {
<div id="searchresults">
<?php 
#Show search results
if (!empty($page_list)) {
    echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>\r\r\n          \t<tr>\r\r\n\t\t\t<td class='listheader'>&nbsp;</td>\r\r\n\t\t\t<td class='listheader' nowrap>Date Added</td>\r\r\n           \t<td class='listheader' nowrap>Subject</td>\r\r\n\t\t\t<td class='listheader' nowrap>Student</td>\r\r\n\t\t\t</tr>";
    $counter = 0;
    foreach ($page_list as $row) {
        #Show one row at a time
        echo "<tr style='" . get_row_color($counter, 2) . "'>\r\r\n\t\t<td valign='top' nowrap>";
        if (1) {
            echo "<a href='javascript:void(0)' onclick=\"confirmDeleteEntity('" . base_url() . "student/delete_miscelleneous/i/" . encryptValue($row['miscid']) . "', 'Are you sure you want to remove this item? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.');\" title=\"Click to remove this item.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>";
        }
        if (1) {
            echo " <a href='" . base_url() . "students/load_miscelleneous_form/i/" . encryptValue($row['miscid']) . "/s/" . encryptValue($row['studentid']) . "' title=\"Click to edit this item.\"><img src='" . base_url() . "images/edit.png' border='0'/></a>";
        }
        echo "</td>\r\r\n\t\t\r\r\n\t\t<td valign='top'>" . date("j M, Y", GetTimeStamp($row['dateadded'])) . "</td>\r\r\n\t\t\r\r\n\t\t<td valign='top'><a href='" . base_url() . "students/load_miscelleneous_form/i/" . encryptValue($row['miscid']) . "/a/" . encryptValue("view") . "/s/" . encryptValue($row['studentid']) . "/u/" . encryptValue("update") . "' title=\"Click to edit this item.\">" . $row['subject'] . "</a></td>\r\r\n\t\t\r\r\n\t\t<td valign='top'>" . $row['firstname'] . " " . $row['lastname'] . "</td>\r\r\n\t\t\r\r\n\t\t</tr>";
        $counter++;
    }
    echo "<tr>\r\r\n\t<td colspan='5' align='right'  class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "students/manage_miscelleneous/p/%d") . "</td>\r\r\n\t</tr>\r\r\n\t</table>";
} else {
    echo format_notice("There is no at the moment.");
}
?>
</div>
              </td>
              </tr>

        </table></td>
            </tr>
          
        </table>
示例#15
0
function get_confirmation_messages($obj, $formdata, $emailtype)
{
    $emailto = '';
    $emailcc = '';
    $emailbcc = '';
    $email_HTML = '';
    $subject = '';
    $fileurl = '';
    $formdata['messageid'] = generate_msg_id();
    $site_url = substr(base_url(), 0, -1);
    switch ($emailtype) {
        case 'registration_confirm':
            $emailto = $formdata['emailaddress'];
            $emailbcc = SITE_ADMIN_MAIL;
            $subject = "Account details for " . $formdata['firstname'] . " " . $formdata['lastname'] . " at " . SITE_TITLE;
            $email_HTML = "Hello " . $formdata['firstname'] . ",\n\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\tA profile has been created for you on the " . SITE_TITLE . ".\n\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\tLogin using the following details:\n\t\t\t\t\t\t\t<br>Email address: " . $formdata['emailaddress'] . "\n\t\t\t\t\t\t\t<br>Password: "******"\n\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\tFor your security, you are advised to change your password the first time you login.";
            $email_HTML .= "<br><br>\n\t\t\t\t\t\t\tRegards,<br><br>\n\t\t\t\t\t\t\tYour team at " . SITE_SLOGAN . "<br>" . $site_url;
            break;
        case 'password_change_notice':
            $emailto = $formdata['emailaddress'];
            $subject = "Your password has been changed at " . SITE_TITLE;
            $call = !empty($formdata['firstname']) ? $formdata['firstname'] : $formdata['emailaddress'];
            $email_HTML = $call . ",\n\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\tYour password has been changed at " . SITE_TITLE . "<br><br>If you did not change your password or authorize its change, please contact us immediately at " . SECURITY_EMAIL;
            $email_HTML .= "<br><br>\n\t\t\t\t\t\tRegards,<br><br>\n\t\t\t\t\t\tYour team at " . SITE_TITLE . "<br>\n\t\t\t\t\t\t" . $site_url;
            break;
        case 'send_sys_msg_by_email':
            $emailto = NOREPLY_EMAIL;
            $emailbcc = $formdata['emailaddress'];
            $subject = $formdata['subject'];
            $email_HTML = "The following message has been sent to you from " . SITE_TITLE . ":<br><hr>" . nl2br($formdata['details']) . "<hr><br>To respond to the above message, please login at:<br>" . base_url() . "admin/login" . "<br><br>and click on the messages icon to respond.";
            $email_HTML .= "<br><br>\n\t\t\t\t\t\t\tRegards,<br><br>\n\t\t\t\t\t\t\tYour team at " . SITE_TITLE . "<br>\n\t\t\t\t\t\t\t" . $site_url;
            break;
        case 'changed_password_notify':
            $emailto = $formdata['emailaddress'];
            $subject = "Your new password for " . SITE_TITLE;
            $call = !empty($formdata['firstname']) ? $formdata['firstname'] : $formdata['emailaddress'];
            $email_HTML = $call . ",\n\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\tYour new password for " . SITE_TITLE . " is: " . $formdata['newpass'] . "<br><br>If you did not request the new password, please contact us immediately at " . SECURITY_EMAIL;
            $email_HTML .= "<br><br>\n\t\t\t\t\t\tRegards,<br><br>\n\t\t\t\t\t\tYour team at " . SITE_TITLE . "<br>\n\t\t\t\t\t\t" . $site_url;
            break;
        case 'website_feedback':
            $emailto = $formdata['emailaddress'];
            $emailbcc = SITE_ADMIN_MAIL;
            $subject = "Your message to " . SITE_TITLE . " has been received.";
            $email_HTML = "Hello,\n\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\tYour message to " . SITE_TITLE . " has been received. If necessary, you will be notified when our staff answers your message.<br>The details of your message are included below:\n\t\t\t\t\t\t<br><br>";
            $email_HTML .= "<table>\n\t\t\t\t\t\t<tr><td nowrap><b>Your email address:</b></td><td>" . $formdata['emailaddress'] . "</td></tr>\n\t\t\t\t\t\t<tr><td nowrap><b>What do you need help with?</b></td><td>" . $formdata['helptopic'] . "</td></tr>\n\t\t\t\t\t\t<tr><td nowrap><b>Subject:</b></td><td>" . $formdata['subject'] . "</td></tr>\n\t\t\t\t\t\t<tr><td nowrap><b>Description:</b></td><td>" . $formdata['description'] . "</td></tr>";
            if (!empty($formdata['attachmenturl'])) {
                $email_HTML .= "<tr><td><b>Attachment:</b></td><td><a href='" . base_url() . "documents/force_download/f/" . encryptValue('attachments') . "/u/" . encryptValue($formdata['attachmenturl']) . "'>" . $formdata['attachmenturl'] . "</a></td></tr>";
            }
            $email_HTML .= "</table>";
            $email_HTML .= "<br><br>\n\t\t\t\t\t\tRegards,<br><br>\n\t\t\t\t\t\tYour team at " . SITE_TITLE . "<br>\n\t\t\t\t\t\t" . $site_url;
            break;
        case 'account_reactivated_notice':
            $emailto = $formdata['emailaddress'];
            $emailbcc = SITE_ADMIN_MAIL;
            $subject = "Your account has been reactivated at " . SITE_TITLE;
            $email_HTML = $formdata['firstname'] . ",\n\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\tYour account with username <b>" . $formdata['username'] . "</b> has been reactivated at " . SITE_TITLE . ".\n\t\t\t\t\t\t<BR><BR>\n\t\t\t\t\t\tIf you did not authorize this action, please notify us immediately at " . SECURITY_EMAIL . ".";
            $email_HTML .= "<br><br>\n\t\t\t\t\t\tRegards,<br><br>\n\t\t\t\t\t\tYour team at " . SITE_TITLE . "<br>\n\t\t\t\t\t\t" . $site_url;
            break;
        default:
            $emailto = $formdata['emailaddress'];
            if (!empty($formdata['subject'])) {
                $subject = $formdata['subject'];
            } else {
                $subject = SITE_TITLE . " Message";
            }
            $email_HTML = $formdata['message'];
            break;
    }
    $email_HTML .= "<br><br>MESSAGE ID: " . $formdata['messageid'];
    return array('emailto' => $emailto, 'emailcc' => $emailcc, 'emailbcc' => $emailbcc, 'subject' => $subject, 'message' => $email_HTML, 'fileurl' => $fileurl);
}
示例#16
0
文件: search.php 项目: nwtug/academia
 function add_word()
 {
     access_control($this);
     # Get the passed details into the form data array if any
     $urldata = $this->uri->uri_to_assoc(3, array('d'));
     # Pick all assigned data
     $data = assign_to_data($urldata);
     if (!empty($data['i']) || $this->input->post('editid')) {
         $editid = $this->input->post('editid') ? $this->input->post('editid') : decryptValue($data['i']);
         $data['formdata'] = $this->Query_reader->get_row_as_array('get_word_by_id', array('wordid' => $editid));
         $data['formdata']['synonyms'] = explode(',', $data['formdata']['synonyms']);
         $data['formdata']['wordtype'] = $data['formdata']['type'];
         $data['i'] = encryptValue($editid);
     }
     if ($this->input->post('addword')) {
         $required_fields = array('word', 'wordtype');
         $_POST = clean_form_data($_POST);
         $validation_results = validate_form('', $_POST, $required_fields);
         if ($validation_results['bool']) {
             if (!empty($editid)) {
                 $result = $this->db->query($this->Query_reader->get_query_by_code('update_word_data', array('type' => $_POST['wordtype'], 'synonyms' => implode(",", $_POST['synonyms']), 'wordid' => $editid)));
             } else {
                 $result = $this->db->query($this->Query_reader->get_query_by_code('save_new_word', array('word' => htmlentities($_POST['word'], ENT_QUOTES), 'type' => $_POST['wordtype'], 'synonyms' => implode(",", $_POST['synonyms']))));
             }
             #Called from a popup
             #Show the appropriate message
             if ($result) {
                 $this->session->set_userdata('smsg', "The word data has been saved.");
                 $data['msg'] = "The word data has been saved.";
             } else {
                 $data['msg'] = "ERROR: The word data could not be saved.";
             }
         }
         if ((empty($validation_results['bool']) || !empty($validation_results['bool']) && !$validation_results['bool']) && empty($data['msg'])) {
             $data['msg'] = "WARNING: The word data could not be saved because of some missing information.";
         }
         $this->session->set_userdata('wmsg', $data['msg']);
         redirect(base_url() . "search/manage_words/m/wmsg");
     }
     $data = add_msg_if_any($this, $data);
     $this->load->view('search/add_word', $data);
 }
        #Show one row at a time
        if ($row['type'] == 'DEBIT') {
            $debit = $row['amount'];
            $credit = 0;
            $balance -= $debit;
            $total_debit += $debit;
        } else {
            $debit = 0;
            $credit = $row['amount'];
            $balance += $credit;
            $total_credit += $credit;
        }
        $fee = get_fee_lines($this, $row['fee']);
        echo "<tr class='listrow' style='" . get_row_color($counter, 2, 'row_borders') . "'>\r\r\n\t\t<td valign='top' nowrap>";
        if (check_user_access($this, 'delete_deal')) {
            echo "<a href='javascript:void(0)' onclick=\"confirmDeleteEntity('" . base_url() . "finances/delete_fee/i/" . encryptValue($row['id']) . "', 'Are you sure you want to remove this fee? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.');\" title=\"Click to remove this fee.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>";
        }
        #if(check_user_access($this,'update_deals')){
        echo " &nbsp;&nbsp; <a href='#' title=\"Click to print this transaction details.\"><img src='" . base_url() . "images/small_pdf.png' border='0'/></a>";
        #}
        echo "</td>\r\r\n\t\t \t\t<td valign='top'>" . date("j M, Y", GetTimeStamp($row['dateadded'])) . "</td>\r\r\n\t\t\t\t<td valign='top'>" . $fee['fee'] . "</td>\r\r\n\t\t\t\t<td valign='top' nowrap align='right'>" . number_format($debit, 0, '.', ',') . "</td>\r\r\n\t\t\t\t<td valign='top' nowrap align='right'>" . number_format($credit, 0, '.', ',') . "</td>\r\r\n\t\t\t\t<td valign='top' nowrap align='right'>" . number_format($balance, 0, '.', ',') . "</td>\r\r\n\t\t\t</tr>";
        $counter++;
    }
    echo "<tr>\r\r\n\t\t  <td colspan='3'></td>\r\r\n\t\t  <td><div class='sum'>" . number_format($total_debit, 0, '.', ',') . "</div></td>\r\r\n\t\t  <td><div class='sum'>" . number_format($total_credit, 0, '.', ',') . "</div></td>\r\r\n\t\t  <td style='padding-right:0'><div class='sum'>" . number_format(-($total_debit - $total_credit), 0, '.', ',') . "</div></td>\r\r\n\t\t </tr>";
    echo "<tr>\r\r\n\t<td colspan='6' align='right'  class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "classes/manage_classes/p/%d") . "</td>\r\r\n\t</tr>\r\r\n\t</table>";
} else {
    echo "<div>No transactions have been added.</div";
}
?>

示例#18
0
if (isset($msg)) {
    echo "<tr><td colspan='4'>" . format_notice($msg) . "</td></tr>";
}
?>
           
            
          <tr>
            <td valign="top">
            <form id="form1" name="form1" method="post" action="<?php 
echo base_url();
?>
inventory/load_inventory_form<?php 
if (!empty($i)) {
    echo "/i/" . $i;
}
echo "/a/" . encryptValue($itemdata['id']);
?>
" >
            <table width="100" border="0" cellspacing="0" cellpadding="8">
            		<tr>
                    <td valign="top" nowrap="nowrap" class="label" style="padding-top:13px">Item Name :<?php 
echo $indicator;
?>
</td>
                    <td class="field" nowrap>
                      <?php 
echo "<span class='viewtext'>" . $itemdata['itemname'] . "</span>";
?>

                    </td>
                    <input type="hidden" name="itemid" value="<?php 
							  		<?php 
                break;
            case 'N':
                ?>
							  			 	<a href="<?php 
                echo base_url() . 'receipts/load_edit_receipt_form/' . encryptValue($value['receiptid']);
                ?>
"> <i class="icon-edit"></i></a>

							  			 <?php 
                # code...
                break;
            default:
                ?>
							 	         <a href="<?php 
                echo base_url() . 'receipts/load_edit_receipt_form/' . encryptValue($value['receiptid']);
                ?>
"> <i class="icon-edit"></i></a>
						             <a href="#" id="savedelreceipt_<?php 
                echo $value['receiptid'];
                ?>
" class="savedelreceipt"> <i class="icon-trash"></i></a>

							  	<?php 
                # code...
                break;
        }
        ?>

						</td>
						<td>
示例#20
0
              <td>
<div id="searchresults">
<?php 
#Show search results
if (!empty($page_list)) {
    echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>\r\r\n          \t<tr>\r\r\n\t\t\t<td class='listheader'>&nbsp;</td>\r\r\n\t\t\t<td class='listheader' nowrap>Date Returned</td>\r\r\n\t\t\t<td class='listheader' nowrap>Title</td>\r\r\n\t\t\t<td class='listheader' nowrap>Serial Number</td>\r\r\n\t\t\t</tr>";
    $counter = 0;
    foreach ($page_list as $row) {
        #check expiry of rental period
        $currentdate = date("Y-m-d H:i:s");
        #Show one row at a time
        echo "<tr style='" . get_row_color($counter, 2) . "'>\r\r\n\t\t\t<td valign='top' nowrap>";
        if (1) {
            echo "<a href='javascript:void(0)' onclick=\"confirmDeleteEntity('" . base_url() . "library/delete_return/i/" . encryptValue($row['returnid']) . "', 'Are you sure you want to remove this borrower? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.');\" title=\"Click to remove this borrower.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>";
        }
        if (1) {
            echo " <a href='" . base_url() . "library/return_rental/i/" . encryptValue($row['returnid']) . "/s/" . encryptValue($row['stockid']) . "' title=\"Click to edit this return.\"><img src='" . base_url() . "images/edit.png' border='0'/></a>";
        }
        echo "</td>\r\r\n\t\t\r\r\n\t\t<td valign='top'>" . date("j M, Y", GetTimeStamp($row['returndate'])) . "</td>\r\r\n\t\t\r\r\n\t\t<td valign='top'><a class=\"fancybox fancybox.ajax\" href='" . base_url() . "library/load_stock_form/i/" . encryptValue($row['stockid']) . "/a/" . encryptValue("view") . "' title=\"Click to view this stock item.\">" . $row['stocktitle'] . "</a></td>\r\r\n\t\t\r\r\n\t\t<td valign='top'><a class=\"fancybox fancybox.ajax\" href='" . base_url() . "library/load_stock_item_form/i/" . encryptValue($row['item']) . "/a/" . encryptValue("view") . "/s/" . encryptValue($row['stockid']) . "' title=\"Click to view this item.\">" . $row['serialnumber'] . "</a></td>\r\r\n\t\t\r\r\n\t\t</tr>";
        $counter++;
    }
    echo "<tr>\r\r\n\t<td colspan='5' align='right'  class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "library/manage_borrowers/p/%d") . "</td>\r\r\n\t</tr>\r\r\n\t</table>";
} else {
    echo format_notice("There is no return at the moment.");
}
?>
</div>
              </td>
              </tr>

        </table>
示例#21
0
 function weeklyreport($level, $data = array())
 {
     switch ($level) {
         case 'ppda':
             $search_str = '  ';
             #Get the paginated list of bid invitations
             $results = paginate_list($this, $data, 'weekly_IFB_report', array('orderby' => '', 'searchstring' => '' . $search_str), 1000);
             # print_r($results); exit();
             $table = "<div>";
             if (!empty($results['page_list'])) {
                 $table .= '<table class="table table-striped table-hover">' . '<thead>' . '<tr>' . '<th width="5%"></th>' . '<th>Procurement Ref. No</th>' . '<th class="hidden-480">Subject of procurement</th>' . '<th class="hidden-480">Bid security</th>' . '<th class="hidden-480">Bid invitation date</th>' . '<th class="hidden-480">Addenda</th>' . '<th>Status</th>' . '<th>Published by</th>' . '<th>Date Added</th>' . '</tr>' . '</thead>' . '</tbody>';
                 foreach ($results['page_list'] as $row) {
                     $this->session->unset_userdata('pdeid');
                     $status_str = '';
                     $addenda_str = '[NONE]';
                     $delete_str = '';
                     $edit_str = '';
                     if (!empty($level) && $level == 'active') {
                         $delete_str = '<a title="Delete bid invitation" href="javascript:void(0);" onclick="confirmDeleteEntity(\'' . base_url() . 'bids/delete_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '\', \'Are you sure you want to delete this bid invitation?\\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.\')"><i class="icon-trash"></i></a>';
                         $edit_str = '<a title="Edit bid details" href="' . base_url() . 'bids/load_bid_invitation_form/i/' . encryptValue($row['bidinvitation_id']) . '"><i class="icon-edit"></i></a>';
                     }
                     if ($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') < 0) {
                         $status_str = 'Bid evaluation | <a title="Select BEB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[Select BEB]</a>';
                     } elseif ($row['bid_approved'] == 'N') {
                         $status_str = 'Not published | <a title="Publish IFB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[Publish IFB]</a>';
                     } elseif ($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') > 0) {
                         $status_str = 'Bidding closes in ' . get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') . ' days | <a title="view IFB document" href="' . base_url() . 'bids/view_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[View IFB]</a>';
                         $addenda_str = '<a title="view addenda list" href="' . base_url() . 'bids/view_addenda/b/' . encryptValue($row['bidinvitation_id']) . '">[View Addenda]</a> | <a title="Add addenda" href="' . base_url() . 'bids/load_ifb_addenda_form/b/' . encryptValue($row['bidinvitation_id']) . '">[Add Addenda]</a>';
                     } else {
                     }
                     $table .= '<tr>' . '<td></td>' . '<td>' . format_to_length($row['procurement_ref_no'], 40) . '</td>' . '<td>' . format_to_length($row['subject_of_procurement'], 50) . '</td>' . '<td>' . (is_numeric($row['bid_security_amount']) ? number_format($row['bid_security_amount'], 0, '.', ',') . ' ' . $row['bid_security_currency_title'] : (empty($row['bid_security_amount']) ? '<i>N/A</i>' : $row['bid_security_amount'])) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['invitation_to_bid_date']) . '</td>' . '<td>' . $addenda_str . '</td>' . '<td>' . $status_str . '</td>' . '<td>' . (empty($row['approver_fullname']) ? 'N/A' : $row['approver_fullname']) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['bid_dateadded']) . '</td>' . '</tr>';
                 }
                 $table .= '</tbody></table>';
                 $table .= '<div class="pagination pagination-mini pagination-centered">' . pagination($this->session->userdata('search_total_results'), $results['rows_per_page'], $results['current_list_page'], base_url() . "bids/manage_bid_invitations/" . $level . "/p/%d") . '</div>';
             } else {
                 $table .= format_notice('WARNING: No bid invitations expiring this week');
             }
             $table .= "</div>";
             $adons = '';
             //$entity =  $records['pdeid'];
             //$this->session->set_userdata('pdeid',$entity);
             $datasx = $this->session->set_userdata('level', 'ppda');
             $entityname = '';
             $entityname = '';
             $adons = date('d-m');
             $level = "Procurement";
             # exit('moooooo');
             $titles = "Weekly  report on expiring IFBs of ITP";
             $body = " " . html_entity_decode($table);
             $permission = "view_bid_invitations";
             $xcv = 0;
             push_permission($titles, $body, $level, $permission);
             #end
             break;
         case 'ifb':
             $search_str = '';
             # code...
             $querys = $this->db->query("select distinct b.pdeid,b.pdename,a.* from pdes b inner join   users a on a.pde = b.pdeid  ")->result_array();
             foreach ($querys as $row => $records) {
                 #get the PDE ID " Idividual Pde Ids ";"
                 $search_str = ' AND procurement_plans.pde_id="' . $records['pdeid'] . '"';
                 $results = paginate_list($this, $data, 'weekly_IFB_report', array('orderby' => '', 'searchstring' => '' . $search_str), 1000);
                 # print_r($results); exit();
                 $table = "<div>";
                 if (!empty($results['page_list'])) {
                     $table .= '<table class="table table-striped table-hover">' . '<thead>' . '<tr>' . '<th width="5%"></th>' . '<th>Procurement Ref. No</th>' . '<th class="hidden-480">Subject of procurement</th>' . '<th class="hidden-480">Bid security</th>' . '<th class="hidden-480">Bid invitation date</th>' . '<th class="hidden-480">Addenda</th>' . '<th>Status</th>' . '<th>Published by</th>' . '<th>Date Added</th>' . '</tr>' . '</thead>' . '</tbody>';
                     foreach ($results['page_list'] as $row) {
                         $this->session->unset_userdata('pdeid');
                         $status_str = '';
                         $addenda_str = '[NONE]';
                         $delete_str = '';
                         $edit_str = '';
                         if (!empty($level) && $level == 'active') {
                             $delete_str = '<a title="Delete bid invitation" href="javascript:void(0);" onclick="confirmDeleteEntity(\'' . base_url() . 'bids/delete_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '\', \'Are you sure you want to delete this bid invitation?\\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.\')"><i class="icon-trash"></i></a>';
                             $edit_str = '<a title="Edit bid details" href="' . base_url() . 'bids/load_bid_invitation_form/i/' . encryptValue($row['bidinvitation_id']) . '"><i class="icon-edit"></i></a>';
                         }
                         if ($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') < 0) {
                             $status_str = 'Bid evaluation | <a title="Select BEB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[Select BEB]</a>';
                         } elseif ($row['bid_approved'] == 'N') {
                             $status_str = 'Not published | <a title="Publish IFB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[Publish IFB]</a>';
                         } elseif ($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') > 0) {
                             $status_str = 'Bidding closes in ' . get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') . ' days | <a title="view IFB document" href="' . base_url() . 'bids/view_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[View IFB]</a>';
                             $addenda_str = '<a title="view addenda list" href="' . base_url() . 'bids/view_addenda/b/' . encryptValue($row['bidinvitation_id']) . '">[View Addenda]</a> | <a title="Add addenda" href="' . base_url() . 'bids/load_ifb_addenda_form/b/' . encryptValue($row['bidinvitation_id']) . '">[Add Addenda]</a>';
                         } else {
                         }
                         $table .= '<tr>' . '<td></td>' . '<td>' . format_to_length($row['procurement_ref_no'], 40) . '</td>' . '<td>' . format_to_length($row['subject_of_procurement'], 50) . '</td>' . '<td>' . (is_numeric($row['bid_security_amount']) ? number_format($row['bid_security_amount'], 0, '.', ',') . ' ' . $row['bid_security_currency_title'] : (empty($row['bid_security_amount']) ? '<i>N/A</i>' : $row['bid_security_amount'])) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['invitation_to_bid_date']) . '</td>' . '<td>' . $addenda_str . '</td>' . '<td>' . $status_str . '</td>' . '<td>' . (empty($row['approver_fullname']) ? 'N/A' : $row['approver_fullname']) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['bid_dateadded']) . '</td>' . '</tr>';
                     }
                     $table .= '</tbody></table>';
                     $table .= '<div class="pagination pagination-mini pagination-centered">' . pagination($this->session->userdata('search_total_results'), $results['rows_per_page'], $results['current_list_page'], base_url() . "bids/manage_bid_invitations/" . $level . "/p/%d") . '</div>';
                 } else {
                     $table .= format_notice('WARNING: No bid invitations expiring this week');
                 }
                 $table .= "</div>";
                 $adons = '';
                 $entity = $records['pdeid'];
                 $this->session->set_userdata('pdeid', $entity);
                 if ($records['usergroup'] > 0) {
                     $level = $records['usergroup'];
                     $this->session->set_userdata('usergroup', $records['usergroup']);
                     // else
                     // $datasx = $this->session->set_userdata('level','ppda');
                 }
                 $entityname = $records['pdename'];
                 $adons = date('d-m');
                 $level = "Procurement";
                 $titles = "Weekly  report on expiring IFBs of " . $entityname . $adons;
                 $body = " " . html_entity_decode($table);
                 $permission = "view_bid_invitations";
                 $xcv = 0;
                 push_permission($titles, $body, $level, $permission, $records['pdeid']);
             }
             break;
         default:
             # code...
             break;
             #  exit();
     }
 }
示例#22
0
        if (is_array($classids)) {
            if (count($classids) > 1) {
                foreach ($classids as $key => $classid) {
                    $class_str .= '<option>' . get_class_title($this, $classid) . '</option>';
                }
                $class_str = '<select class="selectfield">' . $class_str . '</select>';
            } elseif (count($classids) > 0) {
                $class_str = get_class_title($this, end($classids));
            }
        } else {
            $class_str = "N/A";
        }
        #Show one row at a time
        echo "<tr id='tr_" . $row['id'] . "' class='listrow' style='" . get_row_color($counter, 2) . "'>\r\r\n\t\t<td class='leftListCell rightListCell' valign='middle' nowrap>";
        #if(check_user_access($this,'delete_deal')){
        echo "<a href='javascript:void(0)' onclick=\"asynchDelete('" . base_url() . "grading/delete_grading_scheme/i/" . encryptValue($row['id']) . "', 'Are you sure you want to remove this grading scale? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.', 'tr_" . $row['id'] . "');\" title=\"Click to remove " . $row['gradingname'] . " from the school exam schedule.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>";
        #}
        #if(check_user_access($this,'update_deals')){
        echo " &nbsp;&nbsp; <a class='fancybox fancybox.ajax' href='" . base_url() . "grading/load_grading_form/i/" . encryptValue($row['id']) . "' title=\"Click to edit " . $row['gradingname'] . " details.\"><img src='" . base_url() . "images/edit.png' border='0'/></a>";
        #}
        echo "</td>\t\t\r\r\n\t\t\t\t<td valign='middle'>" . $row['gradingname'] . "</td>\t\t\r\r\n\t\t\t\t<td valign='middle'>" . $row['description'] . "</td>\t\t\t\t\r\r\n\t\t\t\t<td valign='middle' nowrap>" . $class_str . "</td>\r\r\n\t\t\t\t<td  class='rightListCell' valign='top'>" . date("j M, Y", GetTimeStamp($row['dateadded'])) . "</td>\t\t\r\r\n\t\t\t</tr>";
        $counter++;
    }
    echo "<tr>\r\r\n\t<td colspan='5' align='right'  class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "grading/manage_grading/p/%d", 'results') . "</td>\r\r\n\t</tr>\r\r\n\t</table>";
} else {
    echo "<div>No grading schemes have been added. Click <a class='fancybox fancybox.ajax' href='" . base_url() . "grading/load_grading_form')' title='Click to add a grading scale'><i>here</i></a> to add a grading scheme</div";
}
?>
    
            
       
示例#23
0
 <?php 
#$page_list = array();
if (!empty($page_list)) {
    echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>\r\r\n          \t<tr>\r\r\n\t\t\t<td class='listheader'>&nbsp;</td>\r\r\n           \t<td class='listheader' nowrap>Date &nbsp;<a class='fancybox fancybox.ajax' href='" . base_url() . "discipline/load_incident_form/s/" . $i . "')' title='Click to add a class'><img src='" . base_url() . "images/add_item.png' border='0'/></a></td>\r\r\n\t\t\t<td class='listheader' nowrap>Incident detail</td>\r\r\n           \t<td class='listheader' nowrap>Response</td>\r\r\n\t\t\t<td class='listheader' nowrap>Action taken</td>\r\r\n\t\t\t</tr>";
    $counter = 0;
    foreach ($page_list as $row) {
        #Show one row at a time
        echo "<tr id='tr_" . $row['incidentid'] . "' class='listrow " . ($counter % 2 ? '' : 'grey_list_row') . "'>\r\r\n\t\t<td class='leftListCell rightListCell' valign='bottom' width='1%' nowrap>";
        #if(check_user_access($this,'delete_deal')){
        echo "<a href='javascript:void(0)' onclick=\"asynchDelete('" . base_url() . "classes/delete_class/i/" . encryptValue($row['incidentid']) . "', 'Are you sure you want to delete this incident? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.', 'tr_" . $row['incidentid'] . "');\" title=\"Click to remove this class.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>";
        #}
        #if(check_user_access($this,'update_deals')){
        echo " &nbsp;&nbsp; <a href='" . base_url() . "classes/load_class_form/i/" . encryptValue($row['incidentid']) . "' title=\"Click to edit this class details.\"><img src='" . base_url() . "images/edit.png' border='0'/></a>";
        #}
        echo "</td>\t\t\r\r\n\t\t\t\t<td valign='top'>" . date("j M, Y", GetTimeStamp($row['incidentdate'])) . "</td>\t\t\r\r\n\t\t\t\t<td valign='top'>" . trimStr($row['incidentdetails'], 80) . "</td>\t\t\t\t\r\r\n\t\t\t\t<td valign='top' nowrap>" . ucwords($row['response']) . "</td>\t\t\r\r\n\t\t\t\t<td valign='top' class='rightListCell'>" . trimStr($row['actiontaken'], 50) . "</td>\t\t\r\r\n\t\t\t</tr>";
        $counter++;
    }
    echo "<tr>\r\r\n\t<td colspan='5' align='right'  class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "classes/manage_classes/p/%d", 'results') . "</td>\r\r\n\t</tr>\r\r\n\t</table>";
} else {
    if (!empty($student_details)) {
        echo "<div>" . $student_details['firstname'] . " has not had any disciplinary incidents so far. Click <a class='fancybox fancybox.ajax' href='" . base_url() . "discipline/load_incident_form/s/" . $i . "')' title='Click to add a class'><i>here</i></a> to add an incident</div>";
    } else {
        echo "<div>No disciplinary incidents have been registered so far. Click <a class='fancybox fancybox.ajax' href='" . base_url() . "discipline/load_incident_form')' title='Click to add a class'><i>here</i></a> to add a new incident</div>";
    }
}
示例#24
0
            <th width="30px">Gender</th>
			<th width="100px">Email Address</th>
			<th width="40px">Phone Number</th>
            <th width="70px">User Level/ Rights</th>
         </tr>
       </thead>
     <tbody>
        <?php 
    do {
        ?>
        <tr class="<?php 
        echo $row['ID'];
        ?>
" style="vertical-align:middle">
          <td align="center"><a href="dashboard.php?p=eW5hcG1vYw==&flag=c3Jlc1V5bmFwbW9j&token=<?php 
        echo encryptValue($row['ID']);
        ?>
&4ct10n=mohetide" title="Update record?">Update</a> / <a class="del" title="Delete user?" href="javascript:;" id="companyusers|ID|<?php 
        echo $row['ID'];
        ?>
">Del</a></td>
          <td><?php 
        echo $row['FirstName'];
        ?>
</td>
          <td><?php 
        echo $row['LastName'];
        ?>
</td>
          <td align="center"><?php 
        echo $row['Gender'];
示例#25
0
<tr>
    <td> Position : </td>
    <td colspan="4">
    <?php 
    $clas_performance = get_all_student_performance_exam($this, $examid);
    $exam_counts = 1;
    $position = position_finder($mark_counter, $exam_counts, $clas_performance);
    echo $position;
    ?>
</td>
</tr>

                    </table>


                <?php 
} else {
    echo $studentdetails['firstname'] . " has not registered for any subjects in " . "<br />" . "Click <a href='javascript:void(0);' onclick=\"updateFieldLayer('" . base_url() . "students/load_registration_form/i/" . @encryptValue($registration_data['id']) . "', '','','academics-content','Please enter the required fields.');\"><i>here</i></a> to register " . ($studentdetails['gender'] == 'Female' ? ' her ' : ' him ') . ' for a subject(s).';
}
?>


            </td>
        </tr>
    </table> -->
</div>




示例#26
0
文件: ls.php 项目: newwavetechug/gpp
                            <div class="col-md-2">
                                <b>Subject Of Procurement</b>
                            </div>
                            <div class="col-md-2">
                                <b>Service Provider</b>
                            </div>
                            <div class="col-md-1">&nbsp;</div>
                        </div><hr>';
    foreach ($page_list as $row) {
        #if multiple providers..
        $providername = $row['providernames'];
        if (!empty($row['joint_venture'])) {
            $providername = '';
            $jv_info = $this->db->query('SELECT * FROM joint_venture WHERE jv = "' . $row['joint_venture'] . '"')->result_array();
            if (!empty($jv_info[0]['providers'])) {
                $providers = $this->db->query('SELECT * FROM providers WHERE providerid IN (' . rtrim($jv_info[0]['providers'], ',') . ')')->result_array();
                foreach ($providers as $provider) {
                    $providername .= (!empty($providername) ? ', ' : '') . $provider['providernames'];
                }
            }
        }
        print '<div class="row">' . '<div class="col-md-2"><strong>' . custom_date_format('d M, Y', $row['date_signed']) . '</strong></div>' . '<div class="col-md-2 procurement_pde">' . $row['pdename'] . '</div>' . '<div class="col-md-2">' . $row['procurement_ref_no'] . '</div>' . '<div class="col-md-2 procurement_subject">' . $row['subject_of_procurement'] . '</div>' . '<div class="col-md-2 procurement_pde">' . $providername . '</div>' . '<div class="col-md-1">
                             <a data-toggle="modal" class="btn  btn-xs btn-primary" role="button" href="' . base_url() . $this->uri->segment(1) . '/' . $this->uri->segment(2) . '/details/' . encryptValue($row['id']) . '" id="modal-703202">
                             Contract details</a></div>' . '</div>' . '<hr>';
    }
} else {
    print format_notice("ERROR: No contracts have been signed");
}
?>
    </div>
</div>
示例#27
0
if (!empty($page_list)) {
    echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>\r\r\n          \t<tr>\r\r\n\t\t\t<td class='listheader' width='1%'>&nbsp;</td>\r\r\n           \t<td class='listheader' nowrap>Group &nbsp;<a class='fancybox fancybox.ajax' href='" . base_url() . "user/load_staff_groups_form')' title='Click to add a user'><img src='" . base_url() . "images/add_item.png' border='0'/></a></td>\r\r\n\t\t\t<td class='listheader' nowrap>Comments</td>\r\r\n\t\t\t<td class='listheader' nowrap>Staff</td>\r\r\n\t\t\t<td class='listheader' nowrap>Date Added</td>\r\r\n\t\t\t</tr>";
    $counter = 0;
    foreach ($page_list as $row) {
        #Get number of users in each group
        $staff = get_group_members($this, $row['id']);
        #Show one row at a time
        echo "<tr id='listrow-" . $row['id'] . "' class='listrow' style='" . get_row_color($counter, 2) . "'>\r\r\n\t\t<td class='leftListCell rightListCell' valign='top' nowrap>";
        #if(check_user_access($this,'delete_deal')){
        echo "<a href='javascript:void(0)' onclick=\"asynchDelete('" . base_url() . "user/delete_staff_group/i/" . encryptValue($row['id']) . "', 'Are you sure you want to remove this staff group? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.','listrow-" . $row['id'] . "');\" title=\"Click to remove this staff group.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>";
        #}
        #if(check_user_access($this,'update_deals')){
        echo " &nbsp;&nbsp; <a class='fancybox fancybox.ajax' href='" . base_url() . "user/load_staff_groups_form/i/" . encryptValue($row['id']) . "' title=\"Click to edit this group's details.\"><img src='" . base_url() . "images/edit.png' border='0'/></a>";
        #}
        #if(check_user_access($this,'update_deals')){
        echo " &nbsp;&nbsp; <a class='fancybox fancybox.ajax' href='" . base_url() . "user/manage_staff_group_rights/i/" . encryptValue($row['id']) . "' title=\"Click to edit this group's rights.\"><img src='" . base_url() . "images/user_group_settings.png' border='0'/></a>";
        #}
        echo "</td>\t\t\r\r\n\t\t\t\t<td valign='top'>" . $row['groupname'] . "</td>\t\t\r\r\n\t\t\t\t<td valign='top'>" . substr($row['comments'], 0, 20) . "..</td>\r\r\n\t\t\t\t<td valign='top'>" . $staff->num_rows() . "</td>\r\r\n\t\t\t\t<td class='rightListCell' valign='top'>" . date("j M, Y", GetTimeStamp($row['dateadded'])) . "</td>\t\t\r\r\n\t\t\t</tr>";
        $counter++;
    }
    echo "<tr>\r\r\n\t\t<td colspan='5' align='right'  class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "user/manage_staff_groups/p/%d", "user-groups-results") . "</td></tr></table>";
} else {
    echo "<div>No staff groups have been created.<br />Click <a class='fancybox fancybox.ajax' href='" . base_url() . "user/load_staff_groups_form')' title='Click to add a user'><i>here</i></a> to create a staff group</div>";
}
?>

            
   
        </td>
        </tr>
      
示例#28
0
    $containerid = mysql_real_escape_string(trim($_POST["truckid"]));
    $trackerid = mysql_real_escape_string(trim($_POST["trackerid"]));
    $query = "INSERT INTO `truckcargotraker` (TruckID, TrackerID, CompanyID, ContainerID, DateLastSeen) VALUES('0', '{$trackerid}', '" . $_SESSION['UserID'] . "', '{$containerid}', NOW())";
    $query = mysql_query($query) or die(mysql_error());
    if ($query) {
        $query = "UPDATE companytrackers SET Status = 'Not available' WHERE ID = '{$trackerid}'";
        $query = mysql_query($query) or die(mysql_error());
        if ($query) {
            ?>
				<script type="text/javascript">
					alert("Tracker has been assigned to the cargo successfully. Thank you!");
					location.replace("dashboard.php?p=<?php 
            echo encryptValue("tracking");
            ?>
&flag=<?php 
            echo encryptValue("compTurakaz");
            ?>
");
				</script>
			<?php 
        }
    }
}
//End of assign a tracker to a truck
//Add new cargo
if (isset($_GET["addcargo"]) && $_GET["addcargo"] == "true") {
    $cnumber = mysql_real_escape_string(trim($_POST["containernumber"]));
    $cargoweight = mysql_real_escape_string(trim($_POST["cargoweight"]));
    $shipmentid = mysql_real_escape_string(trim($_POST["shipmentid"]));
    $uraref = mysql_real_escape_string(trim($_POST["uraref"]));
    $exemption = mysql_real_escape_string(trim($_POST["exemption"]));
示例#29
0
文件: users.php 项目: nwtug/academia
 function get_settings_page()
 {
     return base_url() . 'account/settings/i/' . encryptValue($this->session->userdata('userid'));
 }
示例#30
0
                                    <i class="text-danger fa-2x <?= $row['icon'] ?>"></i>
                                    <?php

                                    echo ucwords($row['title']);
                                    ?>


                                </td>
                                <td >
                                    <?php
                                    if($row['lock']=='n')
                                    {
                                        //if user has permission
                                        if (check_my_access('edit_blog_categories')) {
                                            ?>
                                            <a href="<?= base_url() . $this->uri->segment(1) . '/' . $this->uri->segment(2) . '/edit_blog_category/' . encryptValue($row['id']) ?>">
                                                <i class="fa fa-edit"></i>
                                            </a>
                                        <?php
                                        }
                                        if(check_my_access('delete_blog_categories'))
                                        {
                                            ?>
                                            <a class="action_btn" href="" data-id="<?=$row['id']?>" data-action="delete_blog_category" data-title="Delete  <?=ucwords($row['title'])?>" data-toggle="modal" data-target="#myModal"><i class="fa fa-trash-o"></i></a>
                                        <?php
                                        }
                                        ?>



                                    <?php