示例#1
0
<?php

include_once 'conf/config.php';
include_once 'lang/pso_slider.lang.inc';
include_once CLASS_PATH . 'pso_slider.class.php';
$actScript = 'pso_slider.php';
globalizePost();
$obj = new pso_slider();
$title = getTitleFromMenuCaption('Slider Home');
/**
 * Delete Record
 */
if (!$_SESSION['REDO']) {
    if ($sl_id) {
        $sl_ids = split('__', $sl_id);
        foreach ($sl_ids as $sl_id) {
            $_REQUEST['sl_id'] = $sl_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">
示例#2
0
include_once 'lang/pso_slider.lang.inc';
include_once CLASS_PATH . 'pso_slider.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_slider.form.php';
globalizeGet();
globalizePost();
$obj = new pso_slider();
$title = getTitleFromMenuCaption('Slider Home');
//  Update number values
//  Remove the thousands seperator
$_REQUEST['sl_id'] = str_replace(".", "", $_REQUEST['sl_id']);
$_REQUEST['sl_id'] = str_replace(",", ".", $_REQUEST['sl_id']);
$_REQUEST['sl_order'] = str_replace(".", "", $_REQUEST['sl_order']);
$_REQUEST['sl_order'] = str_replace(",", ".", $_REQUEST['sl_order']);
$_REQUEST['sl_published'] = str_replace(".", "", $_REQUEST['sl_published']);
$_REQUEST['sl_published'] = str_replace(",", ".", $_REQUEST['sl_published']);
//  Set value of checkbox = 0 if not passed in the request
$_REQUEST['sl_published'] = isset($_REQUEST['sl_published']) && $_REQUEST['sl_published'] == "on" ? 1 : 0;
switch ($in2Action) {
    case 'add':
        $_REQUEST['sl_cruser'] = $_SESSION['us_id'];
        $_REQUEST['sl_crdate'] = $_SESSION['us_id'];
示例#3
0
<?php

include_once 'conf/config.php';
include_once 'lang/pso_slider.lang.inc';
include_once CLASS_PATH . 'pso_slider.class.php';
globalizePost();
$obj = new pso_slider();
$rows = MAX_PAGE_RECORDS;
/**
 * Get query data
 */
$obj->Select(array('sl_title', 'sl_img', 'sl_order', 'sl_link', 'IF(sl_published = 1, "' . $yesNo[$_SESSION['lang']][1] . '", "' . $yesNo[$_SESSION['lang']][0] . '") sl_published', 'sl_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->sl_id . '" value="' . $row->sl_id . '"/>
									</td>';
    print '    <td><img src="' . PROJECT_UPLOAD_BO_URL . $row->sl_img . '" class="img-responsive img-circle"/></td>';
    print '    <td>' . $row->sl_title . '</td>';
    print '    <td>' . $row->sl_order . '</td>';
    print '    <td>' . $row->sl_link . '</td>';
    print '    <td>' . $row->sl_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_slider.form.php?recordId=' . $row->sl_id . '&in2Action=editRecord\');"><i class="fa fa-edit"></i>&nbsp;Edit</button>
											<button type="button" class="btn btn-default" onclick="javascript:deleteRecord(\'sl_id\', ' . $row->sl_id . ');"><i class="fa fa-trash-o"></i>&nbsp;Delete</button>
										</div>
									</td>';
    print '</tr>';
}