예제 #1
0
<?php

include_once 'conf/config.php';
include_once 'lang/pso_request.lang.inc';
include_once CLASS_PATH . 'pso_request.class.php';
globalizePost();
$obj = new pso_request();
$rows = MAX_PAGE_RECORDS;
/**
 * Get query data
 */
$obj->Select(array('re_name', 're_company', 're_email', 're_phone', 'IF(re_published = 1, "' . $yesNo[$_SESSION['lang']][1] . '", "' . $yesNo[$_SESSION['lang']][0] . '") re_published', 're_id'), '', $whereClause . ' ORDER BY ' . ($_POST['sort'] - 2) . ' ' . $_POST['dir'], $_POST['page'], $rows, false);
while (!$obj->EOF()) {
    $row = $obj->Row();
    print '	<td>
					<input type="checkbox" name="chkRecord" id="chkRecord_' . $row->re_id . '" value="' . $row->re_id . '"/>
				</td>';
    print '    <td>' . $row->re_name . '</td>';
    print '    <td>' . $row->re_companmy . '</td>';
    print '    <td>' . $row->re_email . '</td>';
    print '    <td>' . $row->re_phone . '</td>';
    print '    <td>' . $row->re_published . '</td>';
    print '    <td>
				 <div class="action-group btn-group pull-right mtm mbm">
					<button type="button" class="btn btn-default" onclick="javascript:window.location.assign(\'pso_request.form.php?recordId=' . $row->re_id . '&in2Action=editRecord\');"><i class="fa fa-edit"></i>&nbsp;Edit</button>
					<button type="button" class="btn btn-default" onclick="javascript:deleteRecord(\'re_id\', ' . $row->re_id . ');"><i class="fa fa-trash-o"></i>&nbsp;Delete</button>
				</div>
			  </td>';
    print '</tr>';
}
예제 #2
0
include_once 'lang/pso_request.lang.inc';
include_once CLASS_PATH . 'pso_request.class.php';
/**
 * Add SESSION variable to prevent main form to REDO the delete action
 */
$_SESSION['REDO'] = true;
/**
 * Errors Management
 */
if ($_GET['error'] == 1) {
    $notification = formatFormErrors($_SESSION['errorMsgs']);
}
$actScript = 'pso_request.form.php';
globalizeGet();
globalizePost();
$obj = new pso_request();
$title = getTitleFromMenuCaption('Request Quote');
//  Update number values
//  Remove the thousands seperator
$_REQUEST['re_id'] = str_replace(".", "", $_REQUEST['re_id']);
$_REQUEST['re_id'] = str_replace(",", ".", $_REQUEST['re_id']);
$_REQUEST['re_published'] = str_replace(".", "", $_REQUEST['re_published']);
$_REQUEST['re_published'] = str_replace(",", ".", $_REQUEST['re_published']);
//  Set value of checkbox = 0 if not passed in the request
$_REQUEST['re_published'] = isset($_REQUEST['re_published']) && $_REQUEST['re_published'] == "on" ? 1 : 0;
switch ($in2Action) {
    case 'add':
        $_REQUEST['re_cruser'] = $_SESSION['us_id'];
        $_REQUEST['re_crdate'] = $_SESSION['us_id'];
        $lastId = $obj->InsertRequest(false);
        foreach ($_FILES as $uploadedFile) {
예제 #3
0
<?php

include_once 'conf/config.php';
include_once 'lang/pso_request.lang.inc';
include_once CLASS_PATH . 'pso_request.class.php';
$actScript = 'pso_request.php';
globalizePost();
$obj = new pso_request();
$title = getTitleFromMenuCaption('Request Quote');
/**
 * Delete Record
 */
if (!$_SESSION['REDO']) {
    if ($re_id) {
        $re_ids = split('__', $re_id);
        foreach ($re_ids as $re_id) {
            $_REQUEST['re_id'] = $re_id;
            $obj->DeleteRequest(false);
        }
    }
}
unset($_SESSION['REDO']);
?>
<!DOCTYPE html>
				<html lang="en">
				<head><title>PSO | Dashboard</title>
				    <meta charset="utf-8">
				    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
				    <meta name="viewport" content="width=device-width, initial-scale=1.0">
				    <link rel="shortcut icon" href="images/icons/favicon.ico">
				    <link rel="apple-touch-icon" href="images/icons/favicon.png">