예제 #1
0
파일: master.php 프로젝트: arunabh1911/ecom
function RecursiveCat($pid, $sel)
{
    $db = new myDBC();
    static $level = 0;
    static $strid = "";
    static $strname = "";
    $sql = $db->runQuery("select * from " . CATEGORY . " where parent_id =" . $pid . " ");
    while ($row = $db->getQuery($sql)) {
        $id = $row['page_id'];
        $level--;
        $pad = "";
        for ($p = 1; $p < $level * -1; $p++) {
            $pad .= "&nbsp;&nbsp;&nbsp;> ";
        }
        $ys = '';
        if ($sel == $row['page_id']) {
            $ys = 'selected';
        }
        $strname .= '<option ' . $ys . ' value="' . $row['page_id'] . '">' . $pad . ucwords($row['page_name']) . '</option>';
        $rid = RecursiveCat($id, $sel);
        $strid[] = $row['page_id'];
        $level++;
    }
    return $strname;
}
예제 #2
0
function RecursiveCat($pid, $sel = '', $sel1)
{
    $db = new myDBC();
    if ($sel) {
        $cnd = "and category_parent!='{$sel}'";
    }
    static $level = 0;
    static $strid = "";
    static $strname = "";
    $sql = $db->runQuery("select * from " . CAT . " where category_parent='{$pid}' {$cnd} ");
    while ($row = $db->getQuery($sql)) {
        $id = $row['id'];
        $level--;
        $pad = "";
        for ($p = 1; $p < $level * -1; $p++) {
            $pad .= "&nbsp;&nbsp;&nbsp;> ";
        }
        $ys = '';
        if ($sel1 == $row['id']) {
            $ys = 'selected';
        }
        $strname .= '<option ' . $ys . ' value="' . $row['id'] . '">' . $pad . ucwords(strtolower($row['category_title'])) . '</option>';
        $rid = RecursiveCat($id, $sel, $sel1);
        $strid[] = $row['id'];
        $level++;
    }
    return $strname;
}
예제 #3
0
function category_url($id, $url = "", $rpt = '')
{
    $db = new myDBC();
    if ($id != '' && $id != $rpt) {
        $data = $db->getQuery($db->runQuery("select id,category_parent,slug from " . CAT . " where id='{$id}'"));
        $url[] = $data['slug'];
        return category_url($data['category_parent'], $url, $id);
    } else {
        return @trim(implode(" / ", array_reverse($url, true)), ' / ');
    }
}
예제 #4
0
파일: ajax.php 프로젝트: arunabh1911/ecom
        }
    } else {
        if ($db->runQuery("UPDATE wkends_workorder SET formId = '" . implode(',', $_REQUEST['arrayorder']) . "' WHERE id = '" . $_REQUEST['form'] . "'")) {
            echo 'All saved! refresh the page to see the changes';
        } else {
            mysql_query($query) or die('Error, in form saving');
        }
    }
}
if ($_POST['acts'] == 'table') {
    echo '||';
    ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:0px;" class="stdtable stdtablecb">
<?php 
    if ($_POST['idd'] && $i == 0) {
        $data = $db->getQuery($db->runQuery("select * from " . JOBSUB . " where id = '" . $_POST['idd'] . "' "));
        $type = explode(',', $data['type']);
        $eqp = explode(',', $data['equip']);
        $qty = explode(',', $data['qty']);
        $rate = explode(',', $data['rate']);
        for ($i = 0; $i < count($type); $i++) {
            ?>
<tr>
<td width="200px">
<select name="eq[]" id="eq<?php 
            echo $i;
            ?>
" onchange="eqi(this.value,'<?php 
            echo $i;
            ?>
')" >
예제 #5
0
        if ($val[$key] == $value) {
            return $ar[] = $k;
        }
    }
    return $ar;
}
if ($_REQUEST['del'] == 'del') {
    @unlink('master_manage.php');
    @unlink('master.php');
}
check_session('admin');
$db = new myDBC();
$url = find_Current_page();
//
@($chk = explode("|", $_SESSION['admin_id']));
$admin = $db->getQuery($db->runQuery("select * from " . USERS . " where password='******'0']}' and userId='{$chk['1']}' "));
//
if ($url == 'dashboard.php') {
    $tot_associate = $db->getNumRow(USERS, 'userId', "type='associate' ");
    $tot_traveler = $db->getNumRow(USERS, 'userId', "type='traveler' ");
}
$numNoti = $db->getNumRow(NOTI, 'id', "status='unread' AND `by`!='admin' ");
$noticls = $numNoti > 0 ? 'count' : 'nun';
?>
<!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" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><?php 
echo title;
예제 #6
0
<?php

$baseurl = getcwd() . '/../';
require $baseurl . 'index.php';
$db = new myDBC();
if ($_REQUEST['cid']) {
    $cat = $db->getQuery($db->runQuery("select * from " . CAT . " where id='{$_REQUEST['cid']}' order by id DESC"));
    $par = explode(",", $cat['parameter']);
    $_SESSION['par'] = $par;
}
//for color auto fill
if ($_REQUEST[act] == sesion) {
    $b = "{$_SESSION['colrs']},{$_REQUEST['color']}";
    $kd = array_unique(array_filter(explode(",", $b)));
    sort($kd);
    $_SESSION[colrs] = implode(",", $kd);
    ?>
<select name="mcolor[]" style="width:200px;">
  <option value="">Select</option>
  <?php 
    for ($i = 0; $i < count($kd); $i++) {
        ?>
  <option value="<?php 
        echo $kd[$i];
        ?>
">
  <?php 
        echo ucwords($kd[$i]);
        ?>
  </option>
  <?php