示例#1
0
        $content .= '</div>';
    }
    if ($id != '') {
        $content .= '<div class="col-md-4">' . JobDetails() . Button('remove_from_parcel', 'Remove', 'btn-danger pull-right');
        $sql = "SELECT * FROM mmb_bespoke_job WHERE id = '{$id}'";
        $content .= EditRecordSticky($sql, array('cost'), 'edit_job', 'id', $id);
        $content .= '</div>';
    }
    $content .= '</div></div>';
}
if ($cmd == '[EDIT_PARCEL]') {
    $content .= '<div  class="container"><div class="pull-right"><a href="?cmd=[PARCEL]&sc=' . $sc . '&pid=' . $pid . '" class="btn btn-info">BACK TO PARCEL</a></div>';
    $table = SelectTable();
    $sql = "SELECT * from {$table} where id ='{$pid}'";
    $field = array('name', 'tracking', 'date_sent', 'date_received');
    $content .= EditRecordSticky($sql, $field, 'edit_parcel', 'id', $pid) . '<hr ><div class="pull-right"> ' . DeleteRecordForm($pid, 'delete_parcel') . '</div><div  class="clearfix"></div><hr ></div>';
}
if ($cmd == '[INVOICE]') {
    $field = array('name', 'inv_quantity', 'inv_desc', 'inv_metal', 'inv_price');
    $sql = "SELECT * from mmb_parcel__bespoke_job_c JOIN mmb_bespoke_job ON mmb_parcel__bespoke_job_c.mmb_parcel090foke_job_idb = mmb_bespoke_job.id  WHERE mmb_parcel__bespoke_job_c.mmb_parcele16e_parcel_ida = '{$pid}'  order by due_back_date";
    $content .= DisplayTable($sql, $field, 'invoice', 0);
}
if ($cmd == '[SEARCH]') {
    if ($_REQUEST['query_string'] != '' | $s != '') {
        if (trim($_REQUEST['query_string']) == '') {
            $s = $_REQUEST['s'];
        } else {
            $s = $_REQUEST['query_string'];
        }
        if (strlen($s) > 0) {
            $content .= '<div class="container-fluid"><div class="row"><div class="col-md-4">';
示例#2
0
function EditJob()
{
    $can_edit = unserialize($_SESSION['login'])['can_edit'];
    $content = '';
    $id = $_REQUEST['id'];
    $sql = "SELECT * from mmb_bespoke_job where id ='{$id}'";
    if ($can_edit == 1) {
        $field = array('due_back_date', 'chase_job', 'job_location', 'job_status');
        $content .= EditRecordSticky($sql, $field, 'edit_job', 'id', $id) . '<hr>';
        $content .= AddToParcel() . '<hr>';
        $content .= '<div  class="pull-left">				
						<a href="?cmd=[EDIT_JOB]&id=' . $id . '" class="btn btn-info">EDIT JOB</a>
						<a href="?cmd=[NEW_JOB]&id=' . $id . '" class="btn btn-info">NEW JOB</a>
					</div>';
    } else {
        $field = array('job_location');
        $content .= EditRecordSticky($sql, $field, 'edit_job', 'id', $id) . '<hr>';
    }
    return $content;
}