示例#1
0
 function disposal_plan_details()
 {
     //verify that plan exists
     $id = decryptValue($this->uri->segment(3));
     $plan_info = get_disposal_record_info_by_disposal_plan($id, '');
     if ($plan_info) {
         //print_array($plan_info);
         //show active plans
         $pieces = explode('/', get_disposal_record_info_by_disposal_plan($id, 'serial'));
         //print_array($pieces);
         $data['pagetitle'] = $pieces[2] . '-' . $pieces[3] . '  ' . get_disposal_record_info_by_disposal_plan($id, 'pde') . ' Disposal plan';
         $data['current_menu'] = 'disposal_plans';
         $data['view_to_load'] = 'public/disposal_plan_export_v';
         $data['plan_id'] = $id;
         $limit = NUM_OF_ROWS_PER_PAGE;
         $where = array('disposal_plan' => $id, 'isactive' => 'Y');
         $data['all_records'] = $this->disposal_record_m->get_where($where);
         $data['all_records_paginated'] = $this->disposal_record_m->get_paginated_by_criteria($num = $limit, $this->uri->segment(5), $where);
         $this->load->library('pagination');
         //pagination configs
         $config = array('base_url' => base_url() . $this->uri->segment(1) . '/' . $this->uri->segment(2) . '/' . $this->uri->segment(3) . '/' . $this->uri->segment(4) . '/', 'total_rows' => count($data['all_records']), 'per_page' => $limit, 'num_links' => $limit, 'use_page_numbers' => TRUE, 'full_tag_open' => '<div class="btn-group">', 'full_tag_close' => '</div>', 'anchor_class' => 'class="btn" ', 'cur_tag_open' => '<div class="btn">', 'cur_tag_close' => '</div>', 'uri_segment' => '5');
         //initialise pagination
         $this->pagination->initialize($config);
         //add to data array
         $data['pages'] = $this->pagination->create_links();
         //load view
         //load view
         $this->load->view('public/home_v', $data);
     } else {
         show_404();
     }
 }
示例#2
0
 function permissions()
 {
     $usertype_info = $this->usertype_m->get_by_id(decryptValue($this->uri->segment(4)));
     if ($usertype_info) {
         $data['main_content'] = 'admin/usergroups/permissions_config_v';
         $data['pagetitle'] = 'Edit User group Permissions';
         //load the admin dashboard view
         $this->load->view('admin/includes/admin_template', $data);
     } else {
         show_404();
     }
 }
示例#3
0
文件: user.php 项目: nwtug/academia
 function delete_staff()
 {
     access_control($this);
     # Get the passed details into the url data array if any
     $urldata = $this->uri->uri_to_assoc(3, array('m', 'i', 't'));
     # Pick all assigned data
     $data = assign_to_data($urldata);
     if (!empty($data['i'])) {
         $result = deactivate_row($this, 'schoolusers', decryptValue($data['i']));
     }
     if (!empty($result) && $result) {
         $data['msg'] = "The user data has been successfully deleted.";
     } else {
         if (empty($data['msg'])) {
             $data['msg'] = "ERROR: The user could not be deleted or was not deleted correctly.";
         }
     }
     if (!empty($data['t']) && $data['t'] == 'super') {
         $tstr = "/t/super";
     } else {
         $tstr = "";
     }
 }
示例#4
0
        }
        ?>
"><?php 
        if (isset($cargo)) {
            echo $row['containernumber'];
        } else {
            echo $row['regnumber'];
        }
        ?>
</option>
 			<?php 
    } while ($row = mysql_fetch_assoc($query));
    ?>
        </select>
        <input type="hidden" name="trackerid" value="<?php 
    echo decryptValue($_GET['token']);
    ?>
" />
         
              <input name="loginbutton" type="submit" value="Submit" class="button"/>  
        </form> 
    
    </td>
  </tr>
</table>

<?php 
} else {
    if (isset($cargo)) {
        echo "<fieldset><h4>There are currently no containers without trackers in the system for assignment!</h4></fieldset>";
    } else {
示例#5
0
 function fetch_exams_ajax()
 {
     $school_id = $this->schoolinfo['id'];
     #GET SEGMENT
     $examid = $this->uri->segment(3);
     $examid = decryptValue($examid);
     #LOAD MODEL
     $this->load->model('marks_view');
     $exam_array = $this->marks_view->fetchexams($examid, $school_id);
     $ary = "";
     foreach ($exam_array as $exam) {
         $ary .= $exam['exam'] . "@@" . encryptValue($exam['id']) . "##";
     }
     echo $ary;
 }
示例#6
0
文件: help.php 项目: nwtug/academia
 function remove_help_item()
 {
     access_control($this);
     # Get the passed details into the url data array if any
     $urldata = $this->uri->uri_to_assoc(3, array('s', 'i'));
     # Pick all assigned data
     $data = restore_bad_chars_in_array(assign_to_data($urldata));
     if (!empty($data['i'])) {
         $del_result = $this->db->query($this->Query_reader->get_query_by_code('remove_help_item', array('id' => decryptValue($data['i']))));
     }
     $t_string = !empty($data['t']) ? "/i/" . $data['t'] : "";
     $msg = !empty($del_result) && $del_result ? "The help item has been removed." : "ERROR: The help item was not removed.";
     $this->session->set_userdata('sres', $msg);
     redirect(base_url() . "help/add_help_topic" . $t_string . "/m/sres");
 }
示例#7
0
<?php

require_once "../Connections/connect.php";
require_once "../pagecheck.php";
require_once "../functions.php";
if (isset($_GET['4ct10n']) && $_GET['4ct10n'] == "mohetide") {
    $recid = decryptValue($_GET['token']);
    $userdata = mysql_fetch_assoc(mysql_query("SELECT * FROM companyusers WHERE ID = '{$recid}'"));
}
?>
<link rel="stylesheet" media="screen" href="../simple-calendar/tcal.css" />
<script type="text/javascript" src="../simple-calendar/tcal.js"></script>
<?php 
if (isset($recid)) {
    echo NULL;
} else {
    ?>
	<form id="manageusers" name="manageusers" method="post" class="viaAjaxx" action="backend.php?adduser=true" >
<?php 
}
?>
      
        <table width="100%" border="0" cellspacing="0" cellpadding="10">
	  <?php 
if (isset($recid)) {
    echo "<tr><td><b>Edit User Details : <em>Click on the value you would like to edit.</em></b></td></tr>";
} else {
    ?>
          <tr>
  			<td colspan="2"><div id="Ajaxresults" style="color:#000; display:none; border:1px solid #F90; background-color: #F0FFE1; padding:10px 20px; font-weight:bold; text-align:center; margin:0 20px 20px 20px;"></div></td>
  		 </tr>
示例#8
0
文件: photo.php 项目: nwtug/academia
 function update_photo_status()
 {
     # Get the passed details into the url data array if any
     $urldata = $this->uri->uri_to_assoc(3, array('i'));
     # Pick all assigned data
     $data = assign_to_data($urldata);
     if (!empty($data['i'])) {
         #Delete an image
         if (!empty($data['a']) && decryptValue($data['a']) == 'delete') {
             $result = $this->db->query($this->Query_reader->get_query_by_code('delete_image', array('id' => decryptValue($data['i']))));
         }
         #Activate an image
         if (!empty($data['a']) && decryptValue($data['a']) == 'activate') {
             $result = $this->db->query($this->Query_reader->get_query_by_code('activate_image', array('status' => 'Y', 'id' => decryptValue($data['i']))));
         }
         #Deactivate an image
         if (!empty($data['a']) && decryptValue($data['a']) == 'deactivate') {
             $result = $this->db->query($this->Query_reader->get_query_by_code('deactivate_image', array('status' => 'N', 'id' => decryptValue($data['i']))));
         }
     }
     #Prepare appropriate message
     if (!empty($result) && $result) {
         $msg = "The photo has been " . decryptValue($data['a']) . "d.";
     } else {
         $msg = "ERROR: The photo could not be " . decryptValue($data['a']) . "d. Please contact your admin.";
     }
     $this->session->set_userdata('lmsg', $msg);
     redirect(base_url() . "photo/album/m/lmsg/i/" . $data['i']);
 }
示例#9
0
文件: admin.php 项目: Bakyenga/kyengs
 function confirm_company_user()
 {
     if ($this->uri->segment(3) && trim($this->uri->segment(3)) != '') {
         $userid = substr(decryptValue(str_replace('_', '=', $this->uri->segment(3))), 2);
         $user_details = $this->Query_reader->get_row_as_array('pick_employee_by_id', array('id' => $userid));
         if (count($user_details) > 0) {
             $result = $this->db->query($this->Query_reader->get_query_by_code('activate_user', array('id' => $userid)));
             if ($result) {
                 $data['msg'] = 'Please login using the username and password in your email message.';
                 $data['isnew'] = $userid;
             } else {
                 $data['error_msg'] = 'ERROR: Your account could not be activated. Please <a href=\\"#\\">click here</a> to contact your administrator.';
             }
         } else {
             $data['error_msg'] = 'The userid is not recognized. Please check if you have copied the full URL.';
         }
     } else {
         $data['error_msg'] = 'The userid is not recognized. Please check if you have copied the full URL.';
     }
     $this->load->view('login', $data);
 }
示例#10
0
 * Created by PhpStorm.
 * User: cengkuru
 * Date: 4/10/2015
 * Time: 8:36 PM
 */
?>
<div id="recent_msg"></div>


<?= $this->load->view('admin/messages/forms/send_msg_f') ?>
<script type="text/javascript">
    $(document).ready(function () {
        //alert('foo');
        var auto_refresh = setInterval(
            function () {
                var reciepient = '<?=decryptValue($this->uri->segment(4))?>';
                var form_data =
                {

                    reciepient: reciepient,
                    ajax: 'get_nw_msg'
                };

                $.ajax({
                    url: "<?php echo site_url($this->uri->segment(1).'/'.$this->uri->segment(2).'/ajax_calls') ?>",
                    type: 'POST',
                    data: form_data,
                    success: function (msg) {

                        $('#recent_msg').html(msg);
示例#11
0
                  <td> 	<?php 
echo $shipmentdata['UnitWidth'] . " metres";
?>
     </td>
                </tr>
               
              </table>
        </td>
        </tr>
  <tr>
    <td>
    <b>Load Scheduling</b>
    <div style="border: 5px solid #CCCCCC;padding:0px;height:100%;" >
    
    <?php 
$query = "SELECT * FROM containers where ShipmentID = '" . decryptValue($_GET['token']) . "' LIMIT 5000";
$query = mysql_query($query) or die(mysql_error());
$rows = mysql_num_rows($query);
$row = mysql_fetch_assoc($query);
if ($rows > 0) {
    ?>
 
    <table width="100%" border="0" cellpadding="10" class="datatable full" style="border:#CCCCCC 1px solid;">        
 		<thead> 
            <tr align="center">
                <th><b>#</b></th>
                <th><b>Container #</b></th>
                <th><b>Truck</b> </th>
                <th><b>Driver</b> </th>
                <th><b>Loading Place</b> </th>
                <th><b>Date</b> </th>
示例#12
0
文件: admin.php 项目: Bakyenga/kyengs
 function confirm_user()
 {
     if ($this->uri->segment(3) && trim($this->uri->segment(3)) != '') {
         $userid = substr(decryptValue(str_replace('_', '=', $this->uri->segment(3))), 2);
         $temp_user = $this->Query_reader->get_row_as_array('get_temp_user_by_id', array('userid' => $userid));
         if (count($temp_user) > 0) {
             $actual_user = $this->Query_reader->get_row_as_array('pick_employee_by_email', array('emailaddress' => $temp_user['emailaddress']));
             if (count($actual_user) == 0) {
                 $temp_user['password'] = sha1($temp_user['password']);
                 #Save the new user data in permanent company and user database table
                 $result1 = $this->db->query($this->Query_reader->get_query_by_code('insert_permanent_company_data', $temp_user));
                 $temp_user['companyid'] = $this->db->call_function('insert_id');
                 $result2 = $this->db->query($this->Query_reader->get_query_by_code('insert_permanent_user_data', $temp_user));
                 $result3 = $this->db->query($this->Query_reader->get_query_by_code('set_who_updated_user_record', array('userid' => $this->db->call_function('insert_id'), 'who' => $this->db->call_function('insert_id'))));
             }
             if ($result1 && $result2 && $result3 && count($actual_user) == 0) {
                 $data['msg'] = 'Congratulations! You are now a confirmed user of ACRAV. Please login below using the user details that were sent to your email.';
                 $data['isnew'] = $userid;
             } else {
                 if (count($actual_user) > 0) {
                     $data['msg'] = 'Please login using the username and password in your email message.';
                     $data['isnew'] = $userid;
                 } else {
                     $data['error_msg'] = 'The userid is not recognized. Please check if you have copied the full URL.';
                 }
             }
         } else {
             $data['error_msg'] = 'The userid is not recognized. Please check if you have copied the full URL.';
         }
     } else {
         $data['error_msg'] = 'The userid is not recognized. Please check if you have copied the full URL.';
     }
     $this->load->view('login', $data);
 }
示例#13
0
  </tr>
  <tr>
    <td align="center" valign="top" style="padding-left:5%">

    <form id="frmreg" name="frmreg" method="post" class="viaAjax" action="processor.php?register=true">
    
    <!-- REGISTRATION REASONS !-->
    	<div align="left" style="padding:15px; width:265px; border-bottom:#F0F0F0 1px solid; border-left:#F0F0F0 1px solid; border-top:#F0F0F0 1px solid; margin-top:100px; float:left; background-color:#FFFFFF;">
    	  <div style="font-size:12px">
    	    <ul class="regOptions">
             	<li><span style="font-size: 18px; color: #990000">CONTACT ADMINISTRATOR</span></li>
             </ul>
           </div>
        </div>
       <?php 
if (isset($_GET['action']) && decryptValue($_GET['action']) == 'login') {
    echo "</form>";
}
?>
        <!-- end registration reasons !-->
        
        <!-- start register box !-->
        <div align="left" style="padding:30px 20px; width:265px; border-bottom:#F0F0F0 1px solid; border-left:#F0F0F0 1px solid; border-top:#F0F0F0 1px solid; margin-top:50px; background:#F8F8F8; float:left; height:380px">
          <div style="font-size:12px">
            <ul class="regOptions">
              <li><span style="font-size: 18px; color: #990000">PASSWORD RECOVERY </span></li>
            </ul>
            <div style="font-size:12px">
              <ul class="regOptions">
                <li><li><form action="recoverpass.php">
                	<input name="email" type="text" class="textfield" id="email" placeholder="Email address  " required="required"/>                    
示例#14
0
              <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="10">
                <tr>
                  
                  <td class="heads" bgcolor="#FFFFFF" style="padding:10px 5px 10px 10px;">
<b>TRACKING ARCHIVE FOR - <span style="color:#820000; font-weight:bold;"><?php 
echo strtoupper(decryptValue($_GET['wibt']));
?>
</span></b>
</td>
                </tr>
                <tr>
                  <td valign="top" nowrap="nowrap"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top" id="gpsabramap">
	<?php 
$rows = mysql_fetch_assoc(mysql_query("select * from msg_archive where phone ='+" . decryptValue($_GET['gp']) . "' order by date_added DESC LIMIT 5000"));
?>
    <iframe id="map" name="map" frameborder="0" allowtransparency="true"  width="98%" height="500" scrolling="no" src="companyTrackCargo/tracker.php?gps=<?php 
echo $rows['message'];
?>
" >                    </iframe></td></tr></table></td>
                  </tr>
              </table></td>
              <td width="1%"><img src='../images/spacer.gif' alt='' border='0' width="4"/></td>
            </tr>
          </table></td>
        </tr>
      </table>
  </td></tr></table></td>
      </tr>
    </table></td>
示例#15
0
 function load_user_form()
 {
     # 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);
     #check user access
     if (!empty($data['i'])) {
         check_user_access($this, 'edit_user_details', 'redirect');
     } else {
         check_user_access($this, 'add_users', 'redirect');
     }
     #Get access groups
     $data['usergroups'] = $this->db->query($this->Query_reader->get_query_by_code('get_user_group_list', array('searchstring' => 'UG.isactive="Y" ' . ($this->session->userdata('isadmin') == 'N' ? ' AND UG.id != 14  AND UG.groupname not like "%PPDA Administrator%"' : ''), 'orderby' => 'ORDER BY UG.groupname', 'limittext' => '')))->result_array();
     #Get pdes
     $this->db->order_by("pdename", "asc");
     $data['pdes'] = $this->db->get_where('pdes', array('isactive' => 'Y', 'status' => 'in'))->result_array();
     #user is editing
     if (!empty($data['i'])) {
         $userid = decryptValue($data['i']);
         $data['formdata'] = $this->Query_reader->get_row_as_array('get_user_by_id', array('id' => $userid));
         #get the user's roles
         $user_roles = $this->db->query($this->Query_reader->get_query_by_code('get_roles_by_user', array('userid' => $userid)))->result_array();
         #format role IDs into simple array
         $data['formdata']['roles'] = array();
         foreach ($user_roles as $user_role) {
             array_push($data['formdata']['roles'], $user_role['groupid']);
         }
         #If the user is to be reactivated
         if (!empty($data['a']) && decryptValue($data['a']) == 'reactivate' && $this->session->userdata('isadmin') == 'Y') {
             $result = $this->db->query($this->Query_reader->get_query_by_code('reactivate_user', array('id' => $userid)));
             if ($result) {
                 $send_result = $this->sysemail->email_form_data(array('fromemail' => NOREPLY_EMAIL), get_confirmation_messages($this, $data['userdetails'], 'account_reactivated_notice'));
             } else {
                 $data['msg'] = "ERROR: There was an error activating the user.";
             }
         }
         #Check if the user is simply viewing
         if (!empty($data['a']) && decryptValue($data['a']) == 'view') {
             $data['isview'] = "Y";
             #get the access group name
             $data['access_group_info'] = $this->Query_reader->get_row_as_array('get_group_by_id', array('groupid' => $data['userdetails']['accessgroup']));
         }
     }
     $data['page_title'] = !empty($data['i']) ? 'Edit user details' : 'Add user';
     $data['current_menu'] = 'add_users';
     $data['view_to_load'] = 'users/user_form_v';
     $data['view_data']['form_title'] = $data['page_title'];
     $this->load->view('dashboard_v', $data);
 }
示例#16
0
 function delete_sponsor()
 {
     access_control($this);
     # Get the passed details into the url data array if any
     $urldata = $this->uri->uri_to_assoc(3, array('m', 'i', 't'));
     # Pick all assigned data
     $data = assign_to_data($urldata);
     if (!empty($data['i'])) {
         $result = deactivate_row($this, 'exams', decryptValue($data['i']));
     }
     if (!empty($result) && $result) {
         $this->session->set_userdata('dexam', "The exam data has been successfully deleted.");
     } else {
         if (empty($data['msg'])) {
             $this->session->set_userdata('dexam', "ERROR: The exam could not be deleted or was not deleted correctly.");
         }
     }
     if (!empty($data['t']) && $data['t'] == 'super') {
         $tstr = "/t/super";
     } else {
         $tstr = "";
     }
     redirect("sponsors/manage_exams/m/dexam" . $tstr);
 }
示例#17
0
 function load_edit_provider_form()
 {
     check_user_access($this, 'edit_provider', 'redirect');
     # 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);
     $data = add_msg_if_any($this, $data);
     $data = handle_redirected_msgs($this, $data);
     $suspendid = decryptValue($this->uri->segment(3));
     #print_r($suspendid); exit();
     $data['suspension_details'] = $this->Remoteapi_m->fetch_suspended_provider($suspendid);
     #print_r($data['suspension_details'] ); exit();
     #print_r($result);
     $data['formtype'] = "edit";
     #$data['active_procurements'] = $this-> Proc_m -> fetch_active_procurement_list2($idx=0);
     $data['page_title'] = 'Suspend Provider ';
     $data['current_menu'] = 'suspend_provider';
     $data['view_to_load'] = 'providers/suspend_provider_v';
     $data['view_data']['form_title'] = $data['page_title'];
     $data['ropproviders'] = $this->Remoteapi_m->fetchproviders();
     $data['countrylist'] = $this->Proc_m->fetchcountries();
     $this->load->view('dashboard_v', $data);
 }
示例#18
0
function access_control($obj, $usertypes = array())
{
    #Check if the user has an active [remember me] cookie
    #If so, log them in remotely.
    $cookie_name = get_user_cookie_name($obj);
    if (!$obj->session->userdata('userid') && isset($_COOKIE[$cookie_name])) {
        #get the stored cookie value with the login details
        $login_details = explode("||", decryptValue($_COOKIE[$cookie_name]));
        $chk_user = $obj->Users->validate_login_user(array('username' => $login_details[0], 'password' => $login_details[1]));
        if (count($chk_user) > 0) {
            $obj->Users->populate_user_details($chk_user);
        }
        #TODO: THIS LINE IS FOR TESTING. REMOVE ON ACTIVE VERSION
        $obj->session->set_userdata('refreshed_session', "YES");
    }
    #By default, this function checks that the user is logged in
    if ($obj->session->userdata('userid')) {
        if ($obj->session->userdata('isadmin') == 'Y') {
            $usertype = 'admin';
        } else {
            $usertype = $obj->session->userdata('usertype');
        }
        #If logged in, check if the user is allowed to access the given page
        if (!empty($usertypes) && !in_array($usertype, $usertypes)) {
            $qmsg = 'WARNING: You do not have the priviledges to access this function.';
        }
    } else {
        $qmsg = 'WARNING: You are not logged in. Please login to continue.';
    }
    #Redirect if the user has no access to the given page
    if (!empty($qmsg)) {
        $obj->session->set_userdata('qmsg', $qmsg);
        redirect(base_url() . "admin/logout/m/qmsg");
    }
}
示例#19
0
function get_tab_data_if_any($data)
{
    if (!empty($data['b'])) {
        $data['activetab'] = decryptValue($data['b']);
    }
    if (!empty($data['s'])) {
        $data['currentlink'] = decryptValue($data['s']);
    }
    return $data;
}
示例#20
0
                      <td valign="top">Receipt : <br/><small>Attach scanned receipt of the Bid security payment</small></td>
                      <td colspan="4"><input type="file" name="file" size="31" class="textfield" required="required" /></td>
                    </tr> 
                    <tr>
                      <td>&nbsp;</td>
                      <td colspan="4">
                     <input type="hidden" name="bidowner" value="<?php 
    echo decryptValue($_GET['sc']);
    ?>
" />
                     <input type="hidden" name="bidid" value="<?php 
    echo decryptValue($_GET['token']);
    ?>
" />
                     <input type="hidden" name="job" value="<?php 
    echo decryptValue($_GET['boj']);
    ?>
" />
                     <input type="submit" name="Submit" value="Submit bid" class="button" />
                        <p><font size="1"> <b>Note:Submitting this page will make your bid posted and you will NOT be able to edit it again. </b></font></p>                   </td>
                    </tr>

                  </table>
                    <?php 
} else {
    echo "<div id='elsebox'><h2>You are not allowed to bid for this work SINCE you have no company documents in the system!</h2></div>";
}
?>
                    </fieldset>
                  </td>
                </tr>
                print '</ul>';
            }
            print '<li class="permission_section"><div><a href="javascript:void(0)">' . $section . '</a></div><ul>';
        }
        print "<li><span><input class='check_permission' name='permissions[]' id='permission_" . $row['id'] . "' type='checkbox' value='" . $row['id'] . "'";
        if (in_array($row['id'], $permissions_list)) {
            print " checked";
        }
        print "/></span><span class='permission' style='font-size: 13px;' width='99%' nowrap>" . $row['permission'] . "</span></li>";
        if ($counter == count($all_permissions) - 1) {
            echo "</ul>";
        }
        $oldsection = $row['section'];
        $counter++;
    }
    print '</ul>';
    if (!empty($i) && decryptValue($i) != 14) {
        print '<div class="form-actions">' . '<input type="hidden" name="editid" value="' . decryptValue($i) . '" />' . '<button type="submit" name="updatepermissions" value="save" class="btn blue">' . '<i class="fa fa-ok"></i> Update permissions</button>&nbsp;&nbsp;' . '<button type="submit" name="cancel" value="cancel" class="btn"><i class="fa fa-remove"></i> Cancel</button>' . '</div>';
    }
    ?>
                    
                </div>
		<?php 
} else {
    echo 'There are no permissions accessed by ' . (!empty($groupdetails['groupname']) ? $groupdetails['groupname'] : 'the user group.');
}
?>
        </form>
    	<!-- END FORM-->
	</div>
</div>
示例#22
0
文件: admin.php 项目: rmuyinda/dms-1
 function user_group_permissions()
 {
     access_control($this, array('admin'));
     # Get the passed details into the url data array if any
     $urldata = $this->uri->uri_to_assoc(3, array('m', 'i', 't'));
     # Pick all assigned data
     $data = assign_to_data($urldata);
     if (!empty($data['i'])) {
         #group details
         $data['groupdetails'] = $this->Query_reader->get_row_as_array('get_group_by_id', array('id' => decryptValue($data['i'])));
         $result = $this->db->query($this->Query_reader->get_query_by_code('get_group_permissions', array('groupid' => decryptValue($data['i']))));
         $the_permissions_list = $result->result_array();
         $data['permissions_list'] = array();
         foreach ($the_permissions_list as $permission_row) {
             array_push($data['permissions_list'], $permission_row['permissionid']);
         }
         $data['groupdetails'] = $this->Query_reader->get_row_as_array('get_group_by_id', array('id' => decryptValue($data['i'])));
         $usertype = $this->session->userdata('isadmin') == 'Y' ? "admin" : "";
         $result = $this->db->query($this->Query_reader->get_query_by_code('get_all_permissions', array('accesslist' => "'" . $usertype . "'")));
         $data['all_permissions'] = $result->result_array();
         #put all permissions in a manageable array
         $data['all_permissions_list'] = array();
         foreach ($data['all_permissions'] as $thepermission) {
             array_push($data['all_permissions_list'], $thepermission['id']);
         }
     }
     $data['view_to_load'] = 'users/user_group_permissions_v';
     $data['page_title'] = 'User group permissions ' . (!empty($data['groupdetails']['groupname']) ? 'for user group <i>[' . $data['groupdetails']['groupname'] . ']</i>' : '');
     $data['current_menu'] = 'view_user_groups';
     $data['search_url'] = '';
     $data['form_title'] = $data['page_title'];
     $this->load->view('dashboard_v', $data);
 }
示例#23
0
文件: search.php 项目: nwtug/academia
 function delete_word()
 {
     access_control($this, array('admin'));
     # 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'])) {
         $result = $this->db->query($this->Query_reader->get_query_by_code('delete_word_by_id', array('id' => decryptValue($data['i']))));
     }
     if (!empty($result) && $result) {
         $msg = "The word has been removed.";
     } else {
         $msg = "ERROR: There were problems removing the word.";
     }
     $this->session->set_userdata('dmsg', $msg);
     redirect(base_url() . "search/manage_words/m/dmsg");
 }
示例#24
0
        </td></tr>  
           		
    
</table>              </td>
            </tr>
            
          </table></td>
          <td valign="top"><img src='../images/spacer.gif' alt='' border='0' width="25"/></td>
          <td valign="top" ><table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="10">
                <tr>
                  
                  <td class="heads" bgcolor="#FFFFFF" style="padding:10px 5px 10px 10px;">
<b>NOW TRACKING - <span style="color:#820000; font-weight:bold;"><?php 
echo strtoupper(decryptValue($_GET['wibt']));
?>
<img src="../images/tracker-select.png" /></span></b>
</td>
                </tr>
                <tr>
                  <td valign="top" nowrap="nowrap"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top" id="gpsabramap">
    <iframe id="map" name="map" frameborder="0" allowtransparency="true"  width="98%" height="500" scrolling="no" src="companyTrackCargo/tracker.php?gps=<?php 
echo $rows['message'];
?>
" >                    </iframe></td></tr></table></td>
                  </tr>
              </table></td>
              <td width="1%"><img src='../images/spacer.gif' alt='' border='0' width="4"/></td>
示例#25
0
}
?>
  <tr>
    <td valign="top">
 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
       <tr>
           <td nowrap="nowrap">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
          <td>
     <?php 
if (isset($bidclosed)) {
    $query = "SELECT * FROM bids where BidOwner = '" . $_SESSION['UserID'] . "' AND JobID = '" . decryptValue($_GET['token']) . "' ORDER BY ID DESC LIMIT 5000";
} else {
    $query = "SELECT * FROM bids where BidOwner = '" . $_SESSION['UserID'] . "' AND JobID = '" . decryptValue($_GET['token']) . "' AND BidWinner = 'Pending' ORDER BY ID DESC LIMIT 5000";
}
$query = mysql_query($query, $connect) or die(mysql_error());
$rows = mysql_num_rows($query);
$row = mysql_fetch_assoc($query);
?>
    <div style="border: 5px solid #CCCCCC;padding:0px;width:100%;height:400px;overflow: auto" >
    <?php 
if ($rows > 0) {
    ?>
    <table border="0" cellpadding="10" class="datatable full" style="border:#CCCCCC 1px solid;">
    <thead>    
        <tr style="text-align:center;">
    
                <th width="50px">Company</th>
                <th width="50px">Proposed Amount (UGX)</th>
示例#26
0
<script>
    $(document).ready(function () {

        $('#edit').click(function () {


            //loading gif
            $(".message").html('<img src="<?=base_url()?>images/loading.gif" /> Please wait...');

            var usertype = $('#usertype').val();

            var form_data =
            {
                usertype: usertype,
                'id': '<?=decryptValue($this->uri->segment(4))?>',
                ajax: 'form_edit'
            };

            $.ajax({
                url: "<?php echo site_url($this->uri->segment(1).'/'.$this->uri->segment(2).'/edit') ?>",
                type: 'POST',
                data: form_data,
                success: function (msg) {

                    $('.message').html(msg);

                }
            });
            return false;
示例#27
0
require_once 'functions.php';
?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Track Cargo</title>
<link rel="stylesheet" media="screen" href="../css/acrav.css" />

<script type="text/javascript" src=""></script>

</head>

<body>
  <?php 
$query = "select * from messages where phone ='+" . decryptValue($_GET['gp']) . "' order by date_added DESC LIMIT 5000";
$query = mysql_query($query, $connect) or die(mysql_error());
$rows = mysql_fetch_assoc($query);
$gps_array = mysql_fetch_array($query);
?>
 
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="tableborder">
    <tr>
        <td align="right" class="menuheader">&nbsp;&raquo;</td>
        <td nowrap="nowrap" class="menuheader">GPS Points</td>
     </tr>
       <script type="text/javascript">var gpsMsgs = []; </script>
        <tr>
         <td colspan="2" height="4"><a href="Javascript:;" onclick="window.frames.map.traceRoute(gpsMsgs)">Trace Route</a></td>
    </tr>
        <tr><td colspan="2">
示例#28
0
        ?>
				 <script type="text/javascript">
					alert("Sorry, an internal error occured, account activation failed. Try again!");
					location.replace("dashboard.php?p=<?php 
        echo encryptValue("members");
        ?>
");
				</script>
		   <?php 
        exit;
    }
}
// End of activating a company account
//Deactivating a company
if (isset($_GET["deactivate"]) && $_GET["deactivate"] == "true") {
    $companyid = decryptValue($_GET['flag']);
    //Activate member
    $qry = mysql_query("UPDATE companies SET Status='1' WHERE ID = '{$companyid}'");
    if ($qry) {
        $query = mysql_query("SELECT * FROM companies WHERE ID = '{$companyid}'");
        $row = mysql_fetch_assoc($query);
        $email = $row['Email'];
        if ($qry) {
            //Send member email with profile info
            $msg = "You are informed that your account was suspended on the Acrav System. \n";
            $msg .= "Contact the system admin on +256414389220 for more information \n\n\n";
            $msg .= "\n\n\n\n";
            $msg .= "From Management, Acrav.";
            $headers = 'From: webmaster@acravonline.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
            $subject = "RE: Account details";
            if (mail($email, $subject, $msg, $headers)) {
示例#29
0
"/>
                      <?php 
    echo get_required_field_wrap($requiredfields, 'telephone', 'end');
}
?>

                    </td>
                  </tr>
                  <tr>
                    <td nowrap="nowrap">&nbsp;</td>
                    <td>&nbsp;<?php 
if (!empty($i) || !empty($editid)) {
    ?>
<input name="editid" type="hidden" id="editid" value="<?php 
    if (!empty($i)) {
        echo decryptValue($i);
    } else {
        echo $editid;
    }
    ?>
"/><?php 
}
?>
</td>
                    <td>&nbsp;</td>
                  </tr>
                  <?php 
if (empty($isview)) {
    ?>

				  <tr>
示例#30
0
 function view_actual_image()
 {
     # Get the passed details into the url data array if any
     $urldata = $this->uri->uri_to_assoc(3, array('u', 'f'));
     # Pick all assigned data
     $data = assign_to_data($urldata);
     #the folder
     if (!empty($data['f'])) {
         $data['folder'] = decryptValue($data['f']);
     } else {
         $data['folder'] = "documents";
     }
     #the file url
     if (empty($data['u'])) {
         $data['msg'] = "WARNING: The image details can not be resolved.";
     } else {
         $data['fileurl'] = decryptValue($data['u']);
     }
     $data['area'] = 'actual_image';
     $data = add_msg_if_any($this, $data);
     $this->load->view('incl/addons', $data);
 }