• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP mkdate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中mkdate函数的典型用法代码示例。如果您正苦于以下问题:PHP mkdate函数的具体用法?PHP mkdate怎么用?PHP mkdate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了mkdate函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: show_report

function show_report($_POST)
{
    extract($_POST);
    if (!isset($employee) or strlen($employee) < 1) {
        return "Invalid use of module.";
    }
    db_connect();
    $get_employee = "SELECT * FROM employees WHERE empnum = '{$employee}' LIMIT 1";
    $run_employee = db_exec($get_employee) or errDie("Unable to get employees information.");
    if (pg_numrows($run_employee) < 1) {
        return "Invalid Employee Selected.";
    } else {
        $earr = pg_fetch_array($run_employee);
        //extract($earr);
    }
    $finstartdate = mkdate(getYearOfFinPrd(1) - 1, $PRDMON[1], 1);
    $finenddate = mkldate(getYearOfFinPrd(12) - 1, $PRDMON[12]);
    db_connect();
    #get all leave for this employee
    $get_leave = "SELECT * FROM empleave WHERE empnum = '{$earr['empnum']}' AND startdate > '{$finstartdate}' AND enddate < '{$finenddate}'";
    $run_leave = db_exec($get_leave) or errDie("Unable to get employee leave information.");
    if (pg_numrows($run_leave) < 1) {
        $listing = "Employee did not apply for leave during the previous financial year.";
    } else {
        $total_leave_days = 0;
        $listing = "\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Leave Start Date</th>\n\t\t\t\t\t<th>Leave End Date</th>\n\t\t\t\t\t<th>Approved By</th>\n\t\t\t\t\t<th>Working Days</th>\n\t\t\t\t\t<th>Non Working Days</th>\n\t\t\t\t\t<th>Leave Type</th>\n\t\t\t\t</tr>\n\t\t\t";
        while ($larr = pg_fetch_array($run_leave)) {
            $total_leave_days = $total_leave_days + $larr['workingdays'];
            $listing .= "\n\t\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t\t<td>{$larr['startdate']}</td>\n\t\t\t\t\t\t<td>{$larr['enddate']}</td>\n\t\t\t\t\t\t<td>{$larr['approvedby']}</td>\n\t\t\t\t\t\t<td>{$larr['workingdays']}</td>\n\t\t\t\t\t\t<td>{$larr['nonworking']}</td>\n\t\t\t\t\t\t<td>{$larr['type']}</td>\n\t\t\t\t\t</tr>\n\t\t\t\t";
        }
        $total_cost = $earr['basic_sal_annum'] / (52 * 5) * $total_leave_days;
    }
    $display = "\n\t\t\t<h2>Calculate Value Of Employee Leave</h2>\n\t\t\t<table " . TMPL_tblDflts . ">\n\t\t\t<form action='" . SELF . "' method='POST'>\n\t\t\t\t<input type='hidden' name='key' value='xls'>\n\t\t\t\t<input type='hidden' name='employee' value='{$employee}'>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan='2'>Details</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td>Employee:</td>\n\t\t\t\t\t<td>{$earr['fnames']} {$earr['sname']}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td>Amount Of Annual Leave Days:</td>\n\t\t\t\t\t<td>{$earr['stdlea']}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td>Total Days Leave Taken</td>\n\t\t\t\t\t<td>{$total_leave_days}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td>Total Cost Of Employee Leave</td>\n\t\t\t\t\t<td>" . CUR . " {$total_cost}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr><td><br></td></tr>\n\t\t\t\t{$listing}\n\t\t\t\t<tr><td><br></td></tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan='4'><input type='submit' name='xls' value='Export to spreadsheet'></td>\n\t\t\t\t</tr>\n\t\t\t</form>\n\t\t\t</table>\n\t\t";
    return $display;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:35,代码来源:leave_report.php


示例2: write

function write($frm)
{
    extract($_REQUEST);
    if ($frm->validate("write")) {
        return confirm($frm);
    }
    pglib_transaction("BEGIN");
    db_conn('cubit');
    $user = USER_NAME;
    $Sql = "SELECT * FROM assets WHERE (dep_month='yes' AND remaction IS NULL)";
    $Rslt = db_exec($Sql) or errDie("Unable to access database.");
    $cc = "";
    $todate = mkdate($date_year, $date_month, $date_day);
    $ttime = mktimefd($todate);
    $refnum = getrefnum($todate);
    while ($led = pg_fetch_array($Rslt)) {
        if (empty($led["autodepr_date"])) {
            $led["autodepr_date"] = $led["date"];
        }
        explodeDate($led["autodepr_date"], $date_year, $date_month, $date_day);
        $ftime = mktime(0, 0, 0, $date_month, $date_day, $date_year);
        $depmonths = 0;
        while ($ftime < $ttime) {
            ++$depmonths;
            $ftime = mktime(0, 0, 0, $date_month + $depmonths, $date_day, $date_year);
        }
        if ($depmonths == 0) {
            continue;
        }
        $depperc = $led["dep_perc"];
        $ml_perc = $depperc * ($depmonths % 12 / 12);
        $years = ($depmonths - $depmonths % 12) / 12;
        $baseamt = $led["amount"] - $led["accdep"];
        $depamt = 0;
        /* yearly depreciations */
        for ($i = 1; $i <= $years; ++$i) {
            $depamt += ($baseamt - $depamt) * ($depperc / 100);
        }
        /* monthly depreciation */
        $depamt += ($baseamt - $depamt) * ($ml_perc / 100);
        $sql = "SELECT * FROM assetgrp WHERE grpid = '{$led['grpid']}' AND div = '" . USER_DIV . "'";
        $grpRslt = db_exec($sql);
        $grp = pg_fetch_array($grpRslt);
        writetrans($grp['depacc'], $grp['accdacc'], $todate, $refnum, $depamt, "{$led['des']} Depreciation");
        db_connect();
        $sql = "UPDATE assets SET accdep = (accdep + '{$depamt}'), autodepr_date='{$todate}'\r\n\t\t\t\tWHERE (id='{$led['id']}' AND div = '" . USER_DIV . "')";
        db_exec($sql) or errdie("Could not update assets table.");
        $snetval = $baseamt - $depamt;
        $sdate = date("Y-m-d");
        $sql = "INSERT INTO assetledger(assetid, asset, date, depamt, netval, div) \r\n\t\t\t\tVALUES ('{$led['id']}', '{$led['des']}', '{$todate}', '{$depamt}', '{$snetval}', '" . USER_DIV . "')";
        db_exec($sql) or errdie("Could not write to asset ledger.");
        $cc .= "CostCenter('ct', 'Asset Depreciation', '{$todate}', '{$led['des']} Depreciation', '{$depamt}', '');";
    }
    pglib_transaction("COMMIT");
    $write = "\r\n\t<script> \r\n\t{$cc}\r\n\t</script>\r\n\t<table " . TMPL_tblDflts . " width='50%'>\r\n\t\t<tr>\r\n\t\t\t<th>Auto Asset Depreciation</th>\r\n\t\t</tr>\r\n\t\t<tr class='datacell'>\r\n\t\t\t<td>Asset Depreciation has calculated and recorded.</td>\r\n\t\t</tr>\r\n\t</table>";
    return $write;
}
开发者ID:kumarsivarajan,项目名称:accounting-123,代码行数:57,代码来源:asset-autodep.php


示例3: getWvListe

function getWvListe()
{
    $ret = array();
    $mailcnt = 0;
    //Mails holen
    $mail = holeMailHeader($_SESSION["loginCRM"], $_SESSION['MailFlag']);
    if ($mail) {
        foreach ($mail as $col) {
            $ret[] = array('Type' => "M", 'Status' => $col["Gelesen"], 'cause' => $col["Betreff"], 'Initdate' => $col["Datum"], 'ID' => $col["Nr"], 'IniUser' => htmlspecialchars($col["Abs"]), 'Art' => "E", 'End' => 0);
            $mailcnt++;
        }
    }
    //Termine holen
    $termine = getTermin(date("d"), date("m"), date("Y"), "T", $_SESSION["loginCRM"]);
    //Wiedervorlagen holen
    $wvl = getWvl($_SESSION["loginCRM"]);
    if ($termine && $wvl) {
        $wvl = array_merge($termine, $wvl);
    } else {
        if ($termine) {
            $wvl = $termine;
        }
    }
    $nunD = date("Y-m-d 00:00:00");
    $nunT = date("Y-m-d H:i");
    if ($wvl) {
        foreach ($wvl as $col) {
            if ($col["finishdate"] || $col["stoptag"]) {
                if ($col["finishdate"] != "" && $col["finishdate"] < $nunD || $col["stoptag"] != "" && $col["stoptag"] . " " . $col["stopzeit"] < $nunT) {
                    $end = 3;
                } else {
                    $end = 2;
                }
                $datum = mkdate($col["finishdate"] ? $col["finishdate"] : $col["stoptag"] . " " . $col["stopzeit"] . ":00");
            } else {
                if ($col["trans_module"]) {
                    $datum = mkdate($col["initdate"] . " 00:00:00");
                } else {
                    $datum = mkdate($col["initdate"] ? $col["initdate"] : $col["starttag"] . " " . $col["startzeit"] . ":00");
                }
                $end = 1;
            }
            if ($col["status"] == "F") {
                $Art = "F";
            } else {
                if ($col["starttag"]) {
                    $Art = "T";
                } else {
                    $Art = "D";
                }
            }
            $ret[] = array('Type' => $col["kontakt"] ? $col["kontakt"] : "X", 'Status' => $col["status"] ? $col["status"] : "-", 'cause' => $col["cause"], 'Initdate' => $datum, 'ID' => $col["id"], 'IniUser' => $col["ename"] ? $col["ename"] : $col["employee"], 'Art' => $Art, 'End' => $end);
        }
    }
    echo json_encode($ret);
}
开发者ID:vanloswang,项目名称:kivitendo-crm,代码行数:56,代码来源:wvll.php


示例4: show_notes

function show_notes($_POST)
{
    extract($_POST);
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($from_day, "num", 1, 2, "Invalid Invoice From Date day.");
    $v->isOk($from_month, "num", 1, 2, "Invalid Invoice From Date month.");
    $v->isOk($from_year, "num", 1, 5, "Invalid Invoice From Date year.");
    $v->isOk($to_day, "num", 1, 2, "Invalid Invoice To Date day.");
    $v->isOk($to_month, "num", 1, 2, "Invalid Invoice To Date month.");
    $v->isOk($to_year, "num", 1, 5, "Invalid Invoice To Date year.");
    $fromdate = mkdate($from_year, $from_month, $from_day);
    $todate = mkdate($to_year, $to_month, $to_day);
    $v->isOk($fromdate, "date", 1, 1, "Invalid From Date.");
    $v->isOk($todate, "date", 1, 1, "Invalid To Date.");
    # display errors, if any
    if ($v->isError()) {
        $err = "";
        $errors = $v->getErrors();
        foreach ($errors as $e) {
            $err .= "<li class='err'>" . $e["msg"] . "</li>";
        }
        return get_filter($_POST, $err);
    }
    $listing = "\n\t\t<tr>\n\t\t\t<th>Customer</th>\n\t\t\t<th>Credit Note No.</th>\n\t\t\t<th>Ref.</th>\n\t\t\t<th>Date</th>\n\t\t\t<th>Amount</th>\n\t\t\t<th>Stock Returned</th>\n\t\t\t<th>Options</th>\n\t\t</tr>";
    db_connect();
    $get_sql = "SELECT * FROM credit_notes WHERE tdate >= '{$fromdate}' AND tdate <= '{$todate}'";
    $run_get = db_exec($get_sql) or errDie("Unable to get credit note information.");
    if (pg_numrows($run_get) < 1) {
        $listing .= "\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td colspan='7'>No Credit Notes Found.</td>\n\t\t\t</tr>";
    } else {
        while ($carr = pg_fetch_array($run_get)) {
            $get_cust = "SELECT surname FROM customers WHERE cusnum = '{$carr['cusnum']}'";
            $run_cust = db_exec($get_cust) or errDie("Unable to get customer information.");
            if (pg_numrows($run_cust) < 1) {
                $cusname = "";
            } else {
                $cusname = pg_fetch_result($run_cust, 0, 0);
            }
            if (isset($carr['used_stock']) and $carr['used_stock'] == "1") {
                $showstockused = "Yes";
            } else {
                $showstockused = "No";
            }
            $listing .= "\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td>{$cusname}</td>\n\t\t\t\t\t<td>g{$carr['creditnote_num']}</td>\n\t\t\t\t\t<td>{$carr['refnum']}</td>\n\t\t\t\t\t<td>{$carr['tdate']}</td>\n\t\t\t\t\t<td>" . CUR . " {$carr['totamt']}</td>\n\t\t\t\t\t<td>{$showstockused}</td>\n\t\t\t\t\t<td><a href='credit-note-print.php?id={$carr['id']}'>Print</a></td>\n\t\t\t\t</tr>";
        }
    }
    $display = "\n\t\t<h2>Listing Of Credit Notes</h2>\n\t\t<table " . TMPL_tblDflts . ">\n\t\t\t{$listing}\n\t\t</table>";
    return $display;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:51,代码来源:credit-notes-view.php


示例5: get_period

function get_period()
{
    global $PRDMON;
    $finstartdate = mkdate(getYearOfFinPrd(1), $PRDMON[1], 1);
    $finenddate = mkldate(getYearOfFinPrd(12), $PRDMON[12]);
    db_connect();
    #get vat period setting
    $get_set = "SELECT * FROM settings WHERE label = 'VAT Period' LIMIT 1";
    $run_set = db_exec($get_set) or errDie("Unable to get vat period information.");
    if (pg_numrows($run_set) < 1) {
        return "\n\t\t\t<li class='err'>Please Set VAT Period Setting Before Continuing.</li>\n\t\t\t<p>\n\t\t\t<table " . TMPL_tblDflts . ">\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Quick Links</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td><a href='../vat_period_setting.php'>Set VAT Period</a></td>\n\t\t\t\t</tr>\n\t\t\t\t<script>document.write(getQuicklinkSpecial());</script>\n\t\t\t</table>";
    } else {
        $sarr = pg_fetch_array($run_set);
        $periodlength = $sarr['value'];
        $b = 1;
        $period_drop = "<select name='period'>";
        for ($x = 1; $b < 12; $x = $x + $periodlength) {
            $b = $b + $periodlength;
            #make sure we dont cross the 12 period limit
            if ($b > 12) {
                #set period to the last
                $dob = $b - 12;
                $b = 12;
                #make sure we get the last month (the -1 makes us lose 1)
                //				$PRDMON[$b] = $PRDMON[$b] +1;
            } else {
                $dob = $b;
            }
            $start = date("Y-m-d", mktime(0, 0, 0, $PRDMON[$x], 1, getYearOfFinPrd($x)));
            $end = date("Y-m-d", mktime(0, 0, 0, $PRDMON[$dob], 0, getYearOfFinPrd($b)));
            $period_drop .= "<option value='{$start}|{$end}'>{$start} - {$end}</option>";
        }
        $period_drop .= "</select>";
    }
    #generate the periods dropdown based on vat period setting.
    $display = "\n\t\t<h2>Select VAT Period For Report</h2>\n\t\t<table " . TMPL_tblDflts . ">\n\t\t<form action='" . SELF . "' method='POST'>\n\t\t\t<input type='hidden' name='key' value='confirm'>\n\t\t\t<tr>\n\t\t\t\t<td><li class='err'>NOTE: Pre Generated Values Are The Cubit Recommened Values. </li></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td><li class='err'>However these values may be changed at will.</li></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th>Period</th>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>{$period_drop}</td>\n\t\t\t</tr>\n\t\t\t<tr><td></td></tr>\n\t\t\t<tr>\n\t\t\t\t<th>Name For Report</th>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td><input type='text' name='returnname' value='" . date("Y-m-d") . " Report'></td>\n\t\t\t</tr>\n\t\t\t<tr><td></td></tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right'><input type='submit' value='Next'></td>\n\t\t\t</tr>\n\t\t</form>\n\t\t</table>";
    return $display;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:38,代码来源:vat_return_report.php


示例6: eval

             $number++;
             $startnow += $config[forum_show_postspp];
         } else {
             $started++;
             $number = "1";
             $startnow = "0";
         }
         $threadid = $thread[id];
         eval("\$inc[showpp] .= \"" . gettemplate("forum.showpp.posts.num") . "\";");
     }
 }
 unset($started, $number, $startnow, $countposts);
 if ($thread[last_posttime]) {
     $lastdate = mkdate($thread[last_posttime]);
 } else {
     $lastdate = mkdate($thread[settime]);
 }
 if ($thread[last_posttime] <= $login[last_forum_read]) {
     if ($threadcolor % 2 == "0") {
         $csstyle = "2";
     } else {
         $csstyle = "1";
     }
 } else {
     if ($threadcolor % 2 == "0") {
         $csstyle = "4";
     } else {
         $csstyle = "3";
     }
 }
 eval("\$incf[threadbit] .= \"" . gettemplate("forum.board.thread.bit") . "\";");
开发者ID:BackupTheBerlios,项目名称:swora,代码行数:31,代码来源:forum_board.php


示例7: show


//.........这里部分代码省略.........
         } else {
             $_REQUEST['searchid'] = '';
         }
     }
     //Sektionen auflisten
     $seclist = '';
     if (is_array($apx->sections) && count($apx->sections)) {
         foreach ($apx->sections as $res) {
             $seclist .= '<option value="' . $res['id'] . '"' . iif($_REQUEST['secid'] == $res['id'], ' selected="selected"') . '>' . replace($res['title']) . '</option>';
         }
     }
     //Kategorien auflisten
     $catlist = '';
     $data = $set['content']['groups'];
     if (count($data)) {
         foreach ($data as $id => $title) {
             $catlist .= '<option value="' . $id . '"' . iif($_REQUEST['catid'] == $id, ' selected="selected"') . '>' . replace($title) . '</option>';
         }
     }
     //Benutzer auflisten
     $userlist = '';
     $data = $db->fetch("SELECT b.userid,b.username FROM " . PRE . "_content AS a LEFT JOIN " . PRE . "_user AS b USING (userid) WHERE a.userid!=0 GROUP BY userid ORDER BY username ASC");
     if (count($data)) {
         foreach ($data as $res) {
             $userlist .= '<option value="' . $res['userid'] . '"' . iif($_REQUEST['userid'] == $res['userid'], ' selected="selected"') . '>' . replace($res['username']) . '</option>';
         }
     }
     $apx->tmpl->assign('ITEM', compatible_hsc($_REQUEST['item']));
     $apx->tmpl->assign('STITLE', (int) $_REQUEST['title']);
     $apx->tmpl->assign('STEXT', (int) $_REQUEST['text']);
     $apx->tmpl->assign('SECLIST', $seclist);
     $apx->tmpl->assign('CATLIST', $catlist);
     $apx->tmpl->assign('USERLIST', $userlist);
     $apx->tmpl->assign('EXTENDED', $searchRes);
     $apx->tmpl->parse('search');
     list($count) = $db->first("SELECT count(id) FROM " . PRE . "_content AS a WHERE 1 " . $resultFilter . section_filter());
     pages('action.php?action=content.show&amp;sortby=' . $_REQUEST['sortby'] . iif($_REQUEST['searchid'], '&amp;searchid=' . $_REQUEST['searchid']), $count);
     $data = $db->fetch("SELECT a.id,a.secid,a.title,a.lastchange,a.allowcoms,a.allowrating,a.active,a.hits,b.userid,b.username FROM " . PRE . "_content AS a LEFT JOIN " . PRE . "_user AS b USING(userid) WHERE 1 " . $resultFilter . section_filter(true, 'a.secid') . " " . getorder($orderdef) . getlimit());
     if (count($data)) {
         foreach ($data as $res) {
             ++$i;
             if ($res['active']) {
                 $tabledata[$i]['COL1'] = '<img src="design/greendot.gif" alt="' . $apx->lang->get('CORE_ACTIVE') . '" title="' . $apx->lang->get('CORE_ACTIVE') . '" />';
             } else {
                 $tabledata[$i]['COL1'] = '<img src="design/reddot.gif" alt="' . $apx->lang->get('CORE_INACTIVE') . '" title="' . $apx->lang->get('CORE_INACTIVE') . '" />';
             }
             $title = $res['title'];
             $title = strip_tags($title);
             //$title=str_replace('=>','»',$title);
             $title = str_replace('->', '»', $title);
             $title = shorttext($title, 40);
             $title = replace($title);
             $temp = explode('->', $res['title']);
             $tmp = unserialize_section($res['secid']);
             $link = mklink('content.php?id=' . $res['id'], 'content,' . $res['id'] . urlformat(array_pop($temp)) . '.html', iif($set['main']['forcesection'], iif(unserialize_section($res['secid']) == array('all'), $apx->section_default, array_shift($tmp)), 0));
             $tabledata[$i]['COL2'] = '<a href="' . $link . '" target="_blank">' . $title . '</a>';
             $tabledata[$i]['COL3'] = replace($res['username']);
             $tabledata[$i]['COL4'] = mkdate($res['lastchange'], '<br />');
             $tabledata[$i]['COL5'] = $res['hits'];
             //Optionen
             if ($apx->user->has_right('content.edit') && ($res['userid'] == $apx->user->info['userid'] || $apx->user->has_spright('content.edit'))) {
                 $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'content.edit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT'));
             }
             if ($apx->user->has_right('content.del') && ($res['userid'] == $apx->user->info['userid'] || $apx->user->has_spright('content.del'))) {
                 $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'content.del', 'id=' . $res['id'], $apx->lang->get('CORE_DEL'));
             }
             if ($res['active'] && $apx->user->has_right('content.disable') && ($res['userid'] == $apx->user->info['userid'] || $apx->user->has_spright('content.disable'))) {
                 $tabledata[$i]['OPTIONS'] .= optionHTML('disable.gif', 'content.disable', 'id=' . $res['id'] . '&sectoken=' . $apx->session->get('sectoken'), $apx->lang->get('CORE_DISABLE'));
             } elseif (!$res['active'] && $apx->user->has_right('content.enable') && ($res['userid'] == $apx->user->info['userid'] || $apx->user->has_spright('content.enable'))) {
                 $tabledata[$i]['OPTIONS'] .= optionHTML('enable.gif', 'content.enable', 'id=' . $res['id'] . '&sectoken=' . $apx->session->get('sectoken'), $apx->lang->get('CORE_ENABLE'));
             } else {
                 $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />';
             }
             //Kommentare + Bewertungen
             if ($apx->is_module('comments') || $apx->is_module('ratings')) {
                 $tabledata[$i]['OPTIONS'] .= '&nbsp;';
             }
             if ($apx->is_module('comments')) {
                 list($comments) = $db->first("SELECT count(id) FROM " . PRE . "_comments WHERE ( module='content' AND mid='" . $res['id'] . "' )");
                 if ($comments && ($apx->is_module('comments') && $set['content']['coms']) && $res['allowcoms'] && $apx->user->has_right('comments.show')) {
                     $tabledata[$i]['OPTIONS'] .= optionHTML('comments.gif', 'comments.show', 'module=content&mid=' . $res['id'], $apx->lang->get('COMMENTS') . ' (' . $comments . ')');
                 } else {
                     $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />';
                 }
             }
             if ($apx->is_module('ratings')) {
                 list($ratings) = $db->first("SELECT count(id) FROM " . PRE . "_ratings WHERE ( module='content' AND mid='" . $res['id'] . "' )");
                 if ($ratings && ($apx->is_module('ratings') && $set['content']['ratings']) && $res['allowrating'] && $apx->user->has_right('ratings.show')) {
                     $tabledata[$i]['OPTIONS'] .= optionHTML('ratings.gif', 'ratings.show', 'module=content&mid=' . $res['id'], $apx->lang->get('RATINGS') . ' (' . $ratings . ')');
                 } else {
                     $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />';
                 }
             }
         }
     }
     $apx->tmpl->assign('TABLE', $tabledata);
     $html->table($col);
     orderstr($orderdef, 'action.php?action=content.show' . iif($_REQUEST['searchid'], '&amp;searchid=' . $_REQUEST['searchid']));
     save_index($_SERVER['REQUEST_URI']);
 }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:101,代码来源:admin.php


示例8: stdmsg

     if (!($last = mkdate($last))) {
         stdmsg("Error", "Invalid date.");
         stdfoot();
         die;
     }
     $q .= ($q ? "&amp;" : "") . "ls={$last}";
     $lasttype = $_GET['lst'];
     $q .= ($q ? "&amp;" : "") . "lst={$lasttype}";
     if ($lasttype == "0") {
         // For mySQL 4.1.1 or above use instead
         // $where_is .= (isset($where_is)?" AND ":"")."DATE(added) = DATE('$date')";
         $where_is .= (isset($where_is) ? " AND " : "") . "(UNIX_TIMESTAMP(last_access) - UNIX_TIMESTAMP('{$last}')) BETWEEN 0 and 86400";
     } else {
         $where_is .= (isset($where_is) ? " AND " : "") . "u.last_access ";
         if ($lasttype == "3") {
             $last2 = mkdate(trim($_GET['ls2']));
             if ($last2) {
                 $where_is .= " BETWEEN '{$last}' and '{$last2}'";
                 $q .= ($q ? "&amp;" : "") . "ls2={$last2}";
             } else {
                 stdmsg("Error", "The second date is not valid.");
                 stdfoot();
                 die;
             }
         } elseif ($lasttype == "1") {
             $where_is .= "< '{$last}'";
         } elseif ($lasttype == "2") {
             $where_is .= "> '{$last}'";
         }
     }
 }
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:31,代码来源:usersearch.php


示例9: recvpayment

function recvpayment()
{
    extract($_POST);
    $v = new validate();
    $v->isOk($cusnum, "num", 1, 10, "Invalid customer id.");
    $v->isOk($invid, "num", 1, 10, "Invalid invoice id.");
    $v->isOk($pcc, "float", 1, 40, "Invalid credit card amount.");
    $v->isOk($pcash, "float", 1, 40, "Invalid cash amount.");
    $v->isOk($pcheque, "float", 1, 40, "Invalid cheque amount.");
    $date = mkdate($pinv_year, $pinv_month, $pinv_day);
    $v->isOk($date, "date", 1, 1, "Invalid invoice date.");
    if ($v->isError()) {
        return details($_POST, $v->genErrors());
    }
    $amt = sprint($pcc + $pcash + $pcheque);
    $cus = qryCustomer($cusnum);
    $bank_acc = qryAccountsName("Cash on Hand");
    $OUT = "\n\t<table " . TMPL_tblDflts . ">\n\t<tr>\n\t\t<th colspan='2'>Payment Details</th>\n\t</tr>\n\t<tr class='" . bg_class() . "'>\n\t\t<td>Account</td>\n\t\t<td>{$bank_acc['topacc']}/{$bank_acc['accnum']} {$bank_acc['accname']}</td>\n\t</tr>\n\t<tr class='" . bg_class() . "'>\n\t\t<td>Date</td>\n\t\t<td valign='center'>{$date}</td>\n\t</tr>\n\t<tr class='" . bg_class() . "'>\n\t\t<td>Received from</td>\n\t\t<td valign='center'>{$cus['cusname']} {$cus['surname']}</td>\n\t</tr>\n\t<tr class='" . bg_class() . "'>\n\t\t<td>Description</td>\n\t\t<td valign='center'>POS Payment Received</td>\n\t</tr>\n\t<tr class='" . bg_class() . "'>\n\t\t<td>Amount</td>\n\t\t<td valign='center'>" . CUR . " {$amt}</td>\n\t</tr>\n\t</table>\n\n\t<form method='post' action='" . SELF . "'>\n\t<input type='hidden' name='key' value='recvpayment_write' />\n\t<input type='hidden' name='bank_acc' value='{$bank_acc['accid']}' />\n\t<input type='hidden' name='invid' value='{$invid}' />\n\t<input type='hidden' name='pcc' value='{$pcc}' />\n\t<input type='hidden' name='pcash' value='{$pcash}' />\n\t<input type='hidden' name='pcheque' value='{$pcheque}' />\n\t<input type='hidden' name='amt' value='{$amt}' />\n\t<input type='hidden' name='date' value='{$date}' />\n\t<input type='hidden' name='cusnum' value='{$cusnum}' />\n\t<input type='hidden' name='descript' value='POS Payment Received' />\n\n\t<input type='hidden' name='stkerr' value='{$stkerr}' />\n\t<input type='hidden' name='prev_cusnum' value='{$prev_cusnum}' />\n\t<input type='hidden' name='deptid' value='{$deptid}' />\n\t<input type='hidden' name='telno' value='{$telno}' />\n\t<input type='hidden' name='cordno' value='{$cordno}' />\n\t<input type='hidden' name='bar' value='{$bar}' />\n\t<input type='hidden' name='des' value='{$des}' />\n\t<input type='hidden' name='sel_frm' value='{$sel_frm}' />\n\t<input type='hidden' name='ordno' value='{$ordno}' />\n\t<input type='hidden' name='pinv_day' value='{$pinv_day}' />\n\t<input type='hidden' name='pinv_month' value='{$pinv_month}' />\n\t<input type='hidden' name='pinv_year' value='{$pinv_year}' />\n\t<input type='hidden' name='chrgvat' value='{$chrgvat}' />\n\t<input type='hidden' name='salespn' value='{$salespn}' />\n\t<input type='hidden' name='traddisc' value='{$traddisc}' />\n\t<input type='hidden' name='delchrg' value='{$delchrg}' />\n\t<input type='hidden' name='delvat' value='{$delvat}' />\n\t<input type='hidden' name='user' value='{$user}' />\n\t<input type='hidden' name='SUBTOT' value='{$subtot}' />\n\t<input type='hidden' name='comm' value='{$comm}' />\n\n\t<table " . TMPL_tblDflts . ">";
    // Connect to database
    db_connect();
    $sql = "SELECT invnum,invid,balance,terms,odate FROM invoices\n\t\t\tWHERE cusnum = '{$cusnum}' AND printed = 'y' AND balance>0\n\t\t\t\tAND div = '" . USER_DIV . "'\n\t\t\tORDER BY odate ASC";
    $prnInvRslt = db_exec($sql);
    $i = 0;
    while (($inv = pg_fetch_array($prnInvRslt)) && $amt > 0) {
        if ($i == 0) {
            $OUT .= "\n\t\t\t<tr>\n\t\t\t\t<td colspan='2'>&nbsp;</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan='2'><h3>Outstanding Invoices</h3></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th>Invoice</th>\n\t\t\t\t<th>Outstanding Amount</th>\n\t\t\t\t<th>Terms</th>\n\t\t\t\t<th>Date</th>\n\t\t\t\t<th>Amount</th>\n\t\t\t</tr>";
        }
        $invid = $inv['invid'];
        $val = allocamt($amt, $inv["balance"]);
        $OUT .= "\n\t\t<input type='hidden' name='paidamt[{$invid}]' size=10 value='{$val}'>\n\t\t<input type='hidden' size=20 name=invids[{$invid}] value='{$inv['invid']}'>\n\t\t<tr bgcolor='" . bgcolor($i) . "'>\n\t\t\t<td>{$inv['invnum']}</td>\n\t\t\t<td>" . CUR . " {$inv['balance']}</td>\n\t\t\t<td>{$inv['terms']} days</td>\n\t\t\t<td>{$inv['odate']}</td>\n\t\t\t<td>" . CUR . " {$val}</td>\n\t\t</tr>";
    }
    $sql = "SELECT invnum,invid,balance,sdate as odate FROM nons_invoices\n\t\t\tWHERE cusid='{$cusnum}' AND done='y' AND balance>0\n\t\t\t\tAND div='" . USER_DIV . "'\n\t\t\tORDER BY odate ASC";
    $prnInvRslt = db_exec($sql);
    while (($inv = pg_fetch_array($prnInvRslt)) && $amt > 0) {
        if ($i == 0) {
            $OUT .= "\n\t\t\t<tr>\n\t\t\t\t<td colspan='2'>&nbsp;</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan='2'><h3>Outstanding Non-Stock Invoices</h3></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th>Invoice</th>\n\t\t\t\t<th>Outstanding Amount</th>\n\t\t\t\t<th></th>\n\t\t\t\t<th>Date</th>\n\t\t\t\t<th>Amount</th>\n\t\t\t</tr>";
        }
        $invid = $inv['invid'];
        $val = allocamt($amt, $inv["balance"]);
        $OUT .= "\n\t\t\t\t<input type='hidden' name='paidamt[{$invid}]' value='{$val}'>\n\t\t\t\t<input type='hidden' name='itype[{$invid}]' value='Yes'>\n\t\t\t\t<tr bgcolor='" . bgcolor($i) . "'>\n\t\t\t\t\t<td><input type='hidden' size='20' name='invids[{$invid}]' value='{$inv['invid']}'>{$inv['invnum']}</td>\n\t\t\t\t\t<td>" . CUR . " {$inv['balance']}</td>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td>{$inv['odate']}</td>\n\t\t\t\t\t<td>" . CUR . " {$val}</td>\n\t\t\t\t</tr>";
    }
    $amt = sprint($amt);
    /* pos invoices */
    $sqls = array();
    for ($i = 1; $i <= 12; ++$i) {
        $sqls[] = "SELECT invnum,invid,balance,odate FROM \"{$i}\".pinvoices\n\t\t\t\t\tWHERE cusnum='{$cusnum}' AND done='y' AND balance>0\n\t\t\t\t\t\tAND div='" . USER_DIV . "'";
    }
    $sql = implode(" UNION ", $sqls);
    $prnInvRslt = db_exec($sql);
    if (pg_numrows($prnInvRslt) > 0) {
        $OUT .= "\n\t\t<tr>\n\t\t\t<td colspan='2'><br></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan='2'><h3>Outstanding POS Invoices</h3></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Invoice</th>\n\t\t\t<th>Outstanding Amount</th>\n\t\t\t<th></th>\n\t\t\t<th>Date</th>\n\t\t\t<th>Amount</th>\n\t\t</tr>";
        $i = 0;
        while ($inv = pg_fetch_array($prnInvRslt)) {
            $invid = $inv['invid'];
            $val = allocamt($amt, $inv["balance"]);
            $OUT .= "\n\t\t\t<input type='hidden' size='20' name='invids[{$invid}]' value='{$inv['invid']}'>\n\t\t\t<input type='hidden' name='paidamt[{$invid}]' size=10 value='{$val}'>\n\t\t\t<input type='hidden' name='ptype[{$invid}]' value='YnYn'>\n\t\t\t<tr bgcolor='" . bgcolor($i) . "'>\n\t\t\t\t<td>{$inv['invnum']}</td>\n\t\t\t\t<td>" . CUR . " {$inv['balance']}</td>\n\t\t\t\t<td></td>\n\t\t\t\t<td>{$inv['odate']}</td>\n\t\t\t\t<td>" . CUR . " {$val}</td>\n\t\t\t</tr>";
        }
    }
    if ($amt > 0) {
        /* START OPEN ITEMS */
        $ox = "";
        $sql = "SELECT * FROM cubit.open_stmnt WHERE balance>0 AND cusnum='{$cusnum}'\n\t\t\t\t\tAND type!='Invoice' AND type!='Non-Stock Invoice'\n\t\t\t\t\tAND type!='Interest on Outstanding balance'\n\t\t\t\tORDER BY date";
        $rslt = db_exec($sql) or errDie("Unable to get open items.");
        $open_out = $amt;
        $i = 0;
        while ($od = pg_fetch_array($rslt)) {
            if ($open_out == 0) {
                continue;
            }
            $oid = $od['id'];
            if ($open_out >= $od['balance']) {
                $open_amount[$oid] = $od['balance'];
                $open_out = sprint($open_out - $od['balance']);
                $ox .= "\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td><input type='hidden' size='20' name='open[{$oid}]' value='{$oid}'>{$od['type']}</td>\n\t\t\t\t\t<td>" . CUR . " {$od['balance']}</td>\n\t\t\t\t\t<td>{$od['date']}</td>\n\t\t\t\t\t<td><input type='hidden' name='open_amount[{$oid}]' value='{$open_amount[$oid]}'>" . CUR . " {$open_amount[$oid]}</td>\n\t\t\t\t</tr>";
            } elseif ($open_out < $od['balance']) {
                $open_amount[$oid] = $open_out;
                $open_out = 0;
                $ox .= "\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td><input type='hidden' size='20' name='open[{$oid}]' value='{$od['id']}'>{$od['type']}</td>\n\t\t\t\t\t<td>" . CUR . " {$od['balance']}</td>\n\t\t\t\t\t<td>{$od['date']}</td>\n\t\t\t\t\t<td><input type='hidden' name='open_amount[{$oid}]' value='{$open_amount[$oid]}'>" . CUR . " {$open_amount[$oid]}</td>\n\t\t\t\t</tr>";
            }
            $i++;
        }
        if (open()) {
            $OUT .= "\n\t\t\t" . TBL_BR . "\n\t\t\t<input type='hidden' name='bout' value='{$amt}'>\n\t\t\t<tr>\n\t\t\t\t<td colspan='2'><h3>Outstanding Transactions</h3></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th>Description</th>\n\t\t\t\t<th>Outstanding Amount</th>\n\t\t\t\t<th>Date</th>\n\t\t\t\t<th>Amount</th>\n\t\t\t</tr>";
            $OUT .= $ox;
            $bout = $amt;
            $amt = $open_out;
            if ($amt > 0) {
                $OUT .= "\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td colspan='4'><b>A general transaction will credit the client's account with " . CUR . " {$amt}</b></td>\n\t\t\t\t</tr>";
            }
            //$amt=$bout;
        } else {
            $OUT .= "\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td colspan='4'><b>A general transaction will credit the client's account with " . CUR . " {$amt} </b></td>\n\t\t\t</tr>";
        }
    }
    $OUT .= "\n\t<input type='hidden' name='out' value='{$amt}' />\n\t<tr>\n\t\t<td colspan='5' align='right'>\n\t\t\t<input type='submit' name='btn_back' value='&laquo; Correction' />\n\t\t\t<input type='submit' value='Record Payment' />\n\t\t</td>\n\t</table>";
    return $OUT;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:97,代码来源:pos-invoice-new-no-neg.php


示例10: profile

 function profile()
 {
     global $set, $apx, $tmpl, $db, $user;
     if (!$_REQUEST['id']) {
         die('missing ID!');
     }
     $res = $db->first("SELECT a.userid,a.username,a.email,a.reg_time,a.reg_email,a.lastactive,b.name FROM " . PRE . "_user AS a LEFT JOIN " . PRE . "_user_groups AS b USING(groupid) WHERE a.userid='" . $_REQUEST['id'] . "'");
     $apx->tmpl->assign('USERID', $res['userid']);
     $apx->tmpl->assign('USERNAME', replace($res['username']));
     $apx->tmpl->assign('REGDATE', mkdate($res['reg_time']));
     $apx->tmpl->assign('REGEMAIL', replace($res['reg_email']));
     $apx->tmpl->assign('EMAIL', replace($res['email']));
     $apx->tmpl->assign('LASTACTIVE', mkdate($res['lastactive']));
     $apx->tmpl->assign('GROUPNAME', replace($res['name']));
     $apx->tmpl->parse('profile');
 }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:16,代码来源:admin.php


示例11: write

function write($_POST)
{
    # Get vars
    extract($_POST);
    if (isset($noduty)) {
        $_POST["noduty"] = "yes";
    } else {
        $exd = "";
    }
    # Validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($letters, "string", 0, 5, "Invalid First 3 Letters.");
    $v->isOk($supid, "num", 1, 20, "Please Select Supplier.");
    $v->isOk($terms, "num", 1, 5, "Invalid terms days.");
    $v->isOk($ipur_day, "num", 1, 2, "Invalid Date day.");
    $v->isOk($ipur_month, "num", 1, 2, "Invalid Date month.");
    $v->isOk($ipur_year, "num", 1, 5, "Invalid Date year.");
    $v->isOk($del_day, "num", 1, 2, "Invalid Delivery Date day.");
    $v->isOk($del_month, "num", 1, 2, "Invalid Delivery Date month.");
    $v->isOk($del_year, "num", 1, 5, "Invalid Delivery Date year.");
    //$v->isOk ($curr, "string", 1, 20, "Invalid Foreign currency.");
    $v->isOk($xrate, "float", 1, 20, "Invalid Exchange Rate.");
    $v->isOk($tax, "float", 0, 20, "Invalid Tax.");
    $v->isOk($shipchrg, "float", 0, 20, "Invalid Shipping Charges.");
    $v->isOk($remarks, "string", 0, 255, "Invalid Remarks.");
    $pdate = mkdate($ipur_year, $ipur_month, $ipur_day);
    $v->isOk($pdate, "date", 1, 1, "Invalid purchase date.");
    $ddate = mkdate($del_year, $del_month, $del_day);
    $v->isOk($ddate, "date", 1, 1, "Invalid delivery date.");
    # Used to generate errors
    $error = "asa@";
    # Check quantities
    if (isset($qtys)) {
        foreach ($qtys as $keys => $qty) {
            $v->isOk($qty, "float", 1, 15, "Invalid Quantity for product number : <b>" . ($keys + 1) . "</b>");
            $v->isOk($unitcost[$keys], "float", 0, 20, "Invalid Unit Price for product number : <b>" . ($keys + 1) . "</b>.");
            $v->isOk($cunitcost[$keys], "float", 0, 20, "Invalid Foreign currency Unit Price for product number : <b>" . ($keys + 1) . "</b>.");
            $v->isOk($duty[$keys], "float", 0, 20, "Invalid Duty Charges for product number : <b>" . ($keys + 1) . "</b>.");
            $v->isOk($dutyp[$keys], "float", 0, 20, "Invalid Duty Charges Percentage for product number : <b>" . ($keys + 1) . "</b>.");
            if ($qty < 1) {
                $v->isOk($qty, "num", 0, 0, "Error : Item Quantity must be at least one. Product number : <b>" . ($keys + 1) . "</b>");
            }
            # Nasty Zeros
            $unitcost[$keys] += 0;
            $cunitcost[$keys] += 0;
            $duty[$keys] += 0;
            $dutyp[$keys] += 0;
        }
    }
    # Check whids
    if (isset($whids)) {
        foreach ($whids as $keys => $whid) {
            $v->isOk($whid, "num", 1, 10, "Invalid Store number, please enter all details.");
        }
    }
    # Check stkids
    if (isset($stkids)) {
        foreach ($stkids as $keys => $stkid) {
            $v->isOk($stkid, "num", 1, 10, "Invalid Stock number, please enter all details.");
        }
    }
    # Check amt
    if (isset($amt)) {
        foreach ($amt as $keys => $amount) {
            $v->isOk($amount, "float", 1, 20, "Invalid Amount, please enter all details.");
        }
    }
    # Display errors, if any
    $err = "";
    if ($v->isError()) {
        $errors = $v->getErrors();
        foreach ($errors as $e) {
            $err .= "<li class='err'>" . $e["msg"] . "</li>";
        }
        $_POST['done'] = "";
        return details($_POST, $err);
    }
    # Get Order info
    db_connect();
    $sql = "SELECT * FROM purch_int WHERE purid = '{$purid}' AND div = '" . USER_DIV . "'";
    $purRslt = db_exec($sql) or errDie("Unable to get Order information");
    if (pg_numrows($purRslt) < 1) {
        return "<li>- Order Not Found</li>";
    }
    $pur = pg_fetch_array($purRslt);
    # check if Order has been printed
    if ($pur['received'] == "y") {
        $error = "<li class='err'> Error : Order number <b>{$purid}</b> has already been received.</li>";
        $error .= "<p><input type='button' onClick='JavaScript:history.back();' value='&laquo; Correct submission'>";
        return $error;
    }
    # Get selected customer info
    db_connect();
    $sql = "SELECT * FROM suppliers WHERE supid = '{$supid}' AND div = '" . USER_DIV . "'";
    $supRslt = db_exec($sql) or errDie("Unable to get customer information");
    if (pg_numrows($supRslt) < 1) {
        // code here
    } else {
        $sup = pg_fetch_array($supRslt);
//.........这里部分代码省略.........
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:101,代码来源:purch-int-new.php


示例12: update

function update($_POST)
{
    extract($_POST);
    $collect_ar = array();
    if (!empty($client_collect)) {
        $collect_ar[] = "Client Collect";
    }
    if (!empty($collect)) {
        $collect_ar[] = "Collect";
    }
    if (!empty($deliver)) {
        $collect_ar[] = "Deliver";
    }
    $collection = implode(", ", $collect_ar);
    // 	if ((in_array("Collect", $collect_ar) && in_array("Client Collect", $collect_ar))
    // 		|| (count($collect_ar) == 3)) {
    // 		return "<li class='err'>Invalid collection options selected.</li>";
    // 	}
    if (count($collect_ar) > 1 && in_array("Client Collect", $collect_ar)) {
        return "<li class='err'>Invalid collection options selected.</li>";
    }
    $temp_assets = explode(",", $temp_assets);
    pglib_transaction("BEGIN");
    if (isset($nhalf_day) && $nhalf_day == "checked") {
        $nhalf_day = 1;
    } else {
        $nhalf_day = 0;
    }
    if (isset($nweekends) && $nweekends == "checked") {
        $nweekends = 1;
    } else {
        $nweekends = 0;
    }
    $sql = "UPDATE hire.hire_invoices SET comm='{$comm}' WHERE invid='{$invid}'";
    $comm_rslt = db_exec($sql) or errDie("Unable to retrieve invoice.");
    foreach ($temp_assets as $key => $value) {
        $sql = "SELECT * FROM cubit.assets WHERE id='{$key}'";
        $asset_rslt = db_exec($sql) or errDie(&quo 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP mkdir函数代码示例发布时间:2022-05-15
下一篇:
PHP mk_thumbnail_image_gen函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap