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

PHP isDate函数代码示例

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

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



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

示例1: getTypeName

function getTypeName($val, $argument = null)
{
    $type = gettype($val);
    global $detectDateMode;
    switch ($type) {
        case "string":
            if ($detectDateMode == 1 && isDate($val)) {
                return "Date";
            } else {
                if ($detectDateMode == 2 && (bool) strtotime($val)) {
                    return "Date";
                } else {
                    return "String";
                }
            }
        case "integer":
            return "int";
        case "double":
            return "float";
        case "boolean":
            return "boolean";
        case "array":
            if (is_numeric(key($val))) {
                return "RealmList<" . $argument . ">";
            } else {
                return $argument;
            }
    }
    return null;
}
开发者ID:tomasz-m,项目名称:realmGenerator,代码行数:30,代码来源:processor.php


示例2: get_list

 /**
  * Get array of articles
  * 
  * For each article, set the article date.
  * The article date can be the creation date or the publish_on date if exists
  *
  * @access	public
  * @param 	array	An associative array
  * @return	array	Array of records
  *
  */
 function get_list($where = FALSE)
 {
     $data = array();
     $this->db->select($this->lang_table . '.*');
     $this->db->join($this->lang_table, $this->lang_table . '.id_' . $this->table . ' = ' . $this->table . '.id_' . $this->table, 'inner');
     $this->db->where($this->lang_table . '.lang', Settings::get_lang('default'));
     $data = parent::get_list($where);
     // Set the correct publish date
     foreach ($data as $key => $row) {
         $data[$key]['date'] = isDate($row['publish_on']) ? $row['publish_on'] : $row['created'];
     }
     return $data;
 }
开发者ID:BGCX261,项目名称:zillatek-project-svn-to-git,代码行数:24,代码来源:article_model.php


示例3: valid_datetime_object

 function valid_datetime_object($t)
 {
     //only date
     if (type($t) == '_Date') {
         $y = $t->get_date();
     } elseif (type($t) == 'DateTime') {
         $y = $t;
     }
     if (isStr($t) && isDate($t)) {
         $s = explode('-', $t);
         $y = new DateTime();
         $y->setDate($s[0], $s[1], $s[2]);
     }
     if (isset($y)) {
         return $y;
     } else {
         return false;
     }
 }
开发者ID:hoangsoft90,项目名称:hw-sudoku-wordpress,代码行数:19,代码来源:hphp._Date.php


示例4: Exception

 require_once NOALYSS_INCLUDE . '/class_follow_up.php';
 /**
  * save info from the get
  */
 $date_event = HtmlInput::default_value_get("date_event", -1);
 $dest = HtmlInput::default_value_get("dest", "");
 $event_group = HtmlInput::default_value_get("event_group", 0);
 $event_priority = HtmlInput::default_value_get("event_priority", 0);
 $title = HtmlInput::default_value_get("title_event", NULL);
 $summary = HtmlInput::default_value_get("summary", "");
 $type_event = HtmlInput::default_value_get('type_event', -1);
 /*
  * Check if data are valid
  */
 try {
     if ($date_event == -1 || isDate($date_event) == 0) {
         throw new Exception(_('Date invalide'));
     }
     if (trim($dest) == "") {
         $dest_id = NULL;
     } else {
         $fiche = new Fiche($cn);
         $fiche->get_by_qcode($dest);
         $dest_id = $fiche->id;
         if ($dest_id == 0) {
             throw new Exception(_('Destinataire invalide'));
         }
     }
     if ($type_event == -1) {
         throw new Exception(_('Type invalide'));
     }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:ajax_gestion.php


示例5: substr_replace

 }
 $strKey = substr_replace($strKey, "", -1);
 $strVal = substr_replace($strVal, "", -2);
 $query = "insert into debitur\r\n                            ({$strKey},usercreate,userupdate,action,tgl_update) \r\n                    values({$strVal},'{$userCreate}','{$userCreate}','{$datenow}','{$datenow}');";
 $buf = cleanstr($db_function->exec($query));
 if ($buf == "") {
     //--insert trail
     $strKey = "";
     $strVal = "'";
     $frmTrail = $_POST['frm'];
     $nonTrail = array('usercreate', 'action');
     foreach ($nonTrail as $row) {
         unset($frmTrail[$row]);
     }
     foreach ($frmTrail as $key => $val) {
         if (isDate($val)) {
             $val = balikTgl($val);
         }
         $strKey .= $key . ",";
         $strVal .= trim($val) . "','";
     }
     $strKey = substr_replace($strKey, "", -1);
     $strVal = substr_replace($strVal, "", -2);
     $query = "insert into debitur_trail\r\n                                (no_trail,{$strKey},userupdate,tgl_update) \r\n                        values('1',{$strVal},'{$userCreate}',now());";
     $buf = cleanstr($db_function->exec($query));
     if ($buf != "") {
         cleanstr($db_function->exec("delete from debitur where noaplikasi='" . $_POST['frm']['noaplikasi'] . "'"));
     }
 }
 //------------
 if ($buf != "") {
开发者ID:prabhaswara,项目名称:collateral,代码行数:31,代码来源:control_frminput.php


示例6: verify

 public function verify()
 {
     if (isDate($this->tl_date) == false) {
         $this->tl_date = date('d.m.Y');
     }
     return 0;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:7,代码来源:class_todo_list.php


示例7: check

 function check()
 {
     /*
      * check date
      */
     if ($this->from != '' && isDate($this->from) == 0 || $this->to != '' && isDate($this->to) == 0) {
         return -1;
     }
     return 0;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:10,代码来源:class_anc_print.php


示例8: cmpDate

/**
 * \brief  Compare 2 dates
 * \param p_date
 * \param p_date_oth
 *
 * \return
 *      - == 0 les dates sont identiques
 *      - > 0 date1 > date2
 *      - < 0 date1 < date2
 */
function cmpDate($p_date, $p_date_oth)
{
    date_default_timezone_set('Europe/Brussels');
    $l_date = isDate($p_date);
    $l2_date = isDate($p_date_oth);
    if ($l_date == null || $l2_date == null) {
        throw new Exception("erreur date [{$p_date}] [{$p_date_oth}]");
    }
    $l_adate = explode(".", $l_date);
    $l2_adate = explode(".", $l2_date);
    $l_mkdate = mktime(0, 0, 0, $l_adate[1], $l_adate[0], $l_adate[2]);
    $l2_mkdate = mktime(0, 0, 0, $l2_adate[1], $l2_adate[0], $l2_adate[2]);
    // si $p_date > $p_date_oth return > 0
    return $l_mkdate - $l2_mkdate;
}
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:25,代码来源:ac_common.php


示例9: whiteWebStat

function whiteWebStat($content)
{
    $splStr = '';
    $splxx = '';
    $filePath = '';
    $nCount = '';
    $url = '';
    $s = '';
    $visitUrl = '';
    $viewUrl = '';
    $viewdatetime = '';
    $ip = '';
    $browser = '';
    $operatingsystem = '';
    $cookie = '';
    $screenwh = '';
    $moreInfo = '';
    $ipList = '';
    $dateClass = '';
    $splxx = aspSplit($content, vbCrlf() . '-------------------------------------------------' . vbCrlf());
    $nCount = 0;
    foreach ($splxx as $key => $s) {
        if (inStr($s, '当前:') > 0) {
            $nCount = $nCount + 1;
            $s = vbCrlf() . $s . vbCrlf();
            $dateClass = ADSql(getFileAttr($filePath, '3'));
            $visitUrl = ADSql(getStrCut($s, vbCrlf() . '来访', vbCrlf(), 0));
            $viewUrl = ADSql(getStrCut($s, vbCrlf() . '当前:', vbCrlf(), 0));
            $viewdatetime = ADSql(getStrCut($s, vbCrlf() . '时间:', vbCrlf(), 0));
            $ip = ADSql(getStrCut($s, vbCrlf() . 'IP:', vbCrlf(), 0));
            $browser = ADSql(getStrCut($s, vbCrlf() . 'browser: ', vbCrlf(), 0));
            $operatingsystem = ADSql(getStrCut($s, vbCrlf() . 'operatingsystem=', vbCrlf(), 0));
            $cookie = ADSql(getStrCut($s, vbCrlf() . 'Cookies=', vbCrlf(), 0));
            $screenwh = ADSql(getStrCut($s, vbCrlf() . 'Screen=', vbCrlf(), 0));
            $moreInfo = ADSql(getStrCut($s, vbCrlf() . '用户信息=', vbCrlf(), 0));
            $browser = ADSql(getBrType($moreInfo));
            if (inStr(vbCrlf() . $ipList . vbCrlf(), vbCrlf() . $ip . vbCrlf()) == false) {
                $ipList = $ipList . $ip . vbCrlf();
            }
            $viewdatetime = replace($viewdatetime, '来访', '00');
            if (isDate($viewdatetime) == false) {
                $viewdatetime = '1988/07/12 10:10:10';
            }
            $screenwh = left($screenwh, 20);
            if (1 == 2) {
                aspEcho('编号', $nCount);
                aspEcho('dateClass', $dateClass);
                aspEcho('visitUrl', $visitUrl);
                aspEcho('viewUrl', $viewUrl);
                aspEcho('viewdatetime', $viewdatetime);
                aspEcho('IP', $ip);
                aspEcho('browser', $browser);
                aspEcho('operatingsystem', $operatingsystem);
                aspEcho('cookie', $cookie);
                aspEcho('screenwh', $screenwh);
                aspEcho('moreInfo', $moreInfo);
                HR();
            }
            connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'websitestat (visiturl,viewurl,browser,operatingsystem,screenwh,moreinfo,viewdatetime,ip,dateclass) values(\'' . $visitUrl . '\',\'' . $viewUrl . '\',\'' . $browser . '\',\'' . $operatingsystem . '\',\'' . $screenwh . '\',\'' . $moreInfo . '\',\'' . $viewdatetime . '\',\'' . $ip . '\',\'' . $dateClass . '\')');
        }
    }
}
开发者ID:313801120,项目名称:AspPhpCms,代码行数:62,代码来源:admin_function.php


示例10: insert

 function insert($p_date_start, $p_date_end, $p_exercice)
 {
     try {
         if (isDate($p_date_start) == null || isDate($p_date_end) == null || strlen(trim($p_exercice)) == 0 || (string) $p_exercice != (string) (int) $p_exercice || $p_exercice < COMPTA_MIN_YEAR || $p_exercice > COMPTA_MAX_YEAR) {
             throw new Exception("Paramètre invalide");
         }
         $p_id = $this->cn->get_next_seq('s_periode');
         $sql = sprintf(" insert into parm_periode(p_id,p_start,p_end,p_closed,p_exercice)" . "values (%d,to_date('%s','DD.MM.YYYY'),to_date('%s','DD.MM.YYYY')" . ",'f','%s')", $p_id, $p_date_start, $p_date_end, $p_exercice);
         $this->cn->start();
         $Res = $this->cn->exec_sql($sql);
         $Res = $this->cn->exec_sql("insert into jrn_periode (jrn_def_id,p_id,status) " . "select jrn_def_id,{$p_id},'OP' from jrn_def");
         $this->cn->commit();
     } catch (Exception $e) {
         $this->cn->rollback();
         return 1;
     }
     return 0;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:18,代码来源:class_periode.php


示例11: format_Time

function format_Time($timeStr, $nType)
{
    $y = '';
    $m = '';
    $d = '';
    $h = '';
    $mi = '';
    $s = '';
    $format_Time = '';
    if (isDate($timeStr) == false) {
        return @$format_Time;
    }
    $y = cStr(year($timeStr));
    $m = cStr(month($timeStr));
    if (len($m) == 1) {
        $m = '0' . $m;
    }
    $d = cStr(day($timeStr));
    //在vb.net里要这样用  D = CStr(CDate(timeStr).Day)
    if (len($d) == 1) {
        $d = '0' . $d;
    }
    $h = cStr(hour($timeStr));
    if (len($h) == 1) {
        $h = '0' . $h;
    }
    $mi = cStr(minute($timeStr));
    if (len($mi) == 1) {
        $mi = '0' . $mi;
    }
    $s = cStr(second($timeStr));
    if (len($s) == 1) {
        $s = '0' . $s;
    }
    switch ($nType) {
        case 1:
            //yyyy-mm-dd hh:mm:ss
            $format_Time = $y . '-' . $m . '-' . $d . ' ' . $h . ':' . $mi . ':' . $s;
            break;
        case 2:
            //yyyy-mm-dd
            $format_Time = $y . '-' . $m . '-' . $d;
            break;
        case 3:
            //hh:mm:ss
            $format_Time = $h . ':' . $mi . ':' . $s;
            break;
        case 4:
            //yyyy年mm月dd日
            $format_Time = $y . '年' . $m . '月' . $d . '日';
            break;
        case 5:
            //yyyymmdd
            $format_Time = $y . $m . $d;
            break;
        case 6:
            //yyyymmddhhmmss
            $format_Time = $y . $m . $d . $h . $mi . $s;
            break;
        case 7:
            //mm-dd
            $format_Time = $m . '-' . $d;
            break;
        case 8:
            //yyyy年mm月dd日
            $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . ':' . $mi . ':' . $s;
            break;
        case 9:
            //yyyy年mm月dd日H时mi分S秒 早上
            $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . '时' . $mi . '分' . $s . '秒,' . getDayStatus($h, 1);
            break;
        case 10:
            //yyyy年mm月dd日H时
            $format_Time = $y . '年' . $m . '月' . $d . '日' . $h . '时';
            break;
        case 11:
            //yyyy年mm月dd日H时mi分S秒
            $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . '时' . $mi . '分' . $s . '秒';
            break;
        case 12:
            //yyyy年mm月dd日H时mi分
            $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . '时' . $mi . '分';
            break;
        case 13:
            //yyyy年mm月dd日H时mi分 早上
            $format_Time = $m . '月' . $d . '日' . ' ' . $h . ':' . $mi . ' ' . getDayStatus($h, 0);
            break;
        case 14:
            //yyyy年mm月dd日
            $format_Time = $y . '/' . $m . '/' . $d;
            break;
        case 15:
            //yyyy年mm月 第1周
            $format_Time = $y . '年' . $m . '月 第' . GetCountPage($d, 7) . '周';
    }
    return @$format_Time;
}
开发者ID:313801120,项目名称:AspPhpCms,代码行数:97,代码来源:Time.php


示例12: date

 public static function date(FTL_Binding $tag)
 {
     if (!isDate($tag->locals->comment["created"])) {
         return;
     }
     return $tag->locals->comment["created"];
 }
开发者ID:BGCX261,项目名称:zillatek-project-svn-to-git,代码行数:7,代码来源:tags.php


示例13: ob_start

    case 'save':
        ob_start();
        try {
            $cn->start();
            if ($access == "W") {
                if (isset($_POST['p_ech'])) {
                    $ech = $_POST['p_ech'];
                    if (trim($ech) != '' && isDate($ech) != null) {
                        $cn->exec_sql("update jrn set jr_ech=to_date(\$1,'DD.MM.YYYY') where jr_id=\$2", array($ech, $jr_id));
                    } else {
                        $cn->exec_sql("update jrn set jr_ech=null where jr_id=\$1", array($jr_id));
                    }
                }
                if (isset($_POST['p_date_paid'])) {
                    $ech = $_POST['p_date_paid'];
                    if (trim($ech) != '' && isDate($ech) != null) {
                        $cn->exec_sql("update jrn set jr_date_paid=to_date(\$1,'DD.MM.YYYY') where jr_id=\$2", array($ech, $jr_id));
                    } else {
                        $cn->exec_sql("update jrn set jr_date_paid=null where jr_id=\$1", array($jr_id));
                    }
                }
                $cn->exec_sql("update jrn set jr_comment=\$1,jr_pj_number=\$2,jr_date=to_date(\$4,'DD.MM.YYYY') where jr_id=\$3", array($_POST['lib'], $_POST['npj'], $jr_id, $_POST['p_date']));
                $cn->exec_sql("update jrnx set j_date=to_date(\$1,'DD.MM.YYYY') where j_grpt in (select jr_grpt_id from jrn where jr_id=\$2)", array($_POST['p_date'], $jr_id));
                $cn->exec_sql('update operation_analytique set oa_date=j_date from jrnx
				where
				operation_analytique.j_id=jrnx.j_id  and
				operation_analytique.j_id in (select j_id
						from jrnx join jrn on (j_grpt=jr_grpt_id)
						where jr_id=$1)
						', array($jr_id));
                $cn->exec_sql("select comptaproc.jrn_add_note(\$1,\$2)", array($jr_id, $_POST['jrn_note']));
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:ajax_ledger.php


示例14: verify

 /**
  * Verify that data are correct
  * @throws Exception
  */
 function verify()
 {
     if ($this->dt_id == -1) {
         throw new Exception(_('Type action invalide'), 10);
     }
     if (isDate($this->ag_timestamp) != $this->ag_timestamp) {
         throw new Exception(_('Date invalide'), 20);
     }
     if (isDate($this->ag_remind_date) != $this->ag_remind_date) {
         throw new Exception(_('Date invalide'), 30);
     }
     if ($this->f_id_dest == 0) {
         $this->f_id_dest = null;
     }
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:19,代码来源:class_follow_up.php


示例15: tr

echo tr($r);
// limit of the year
$exercice = $g_user->get_exercice();
$periode = new Periode($cn);
list($first_per, $last_per) = $periode->get_limit($exercice);
$start = new IDate('start');
if (isset($_GET['start']) && isDate($_GET['start']) == null) {
    echo alert(_('Date malformée, désolé'));
    $_GET['start'] = $first_per->first_day();
}
$start->value = isset($_GET['start']) ? $_GET['start'] : $first_per->first_day();
$r = td(_('Date début'));
$r .= td($start->input());
echo tr($r);
$end = new IDate('end');
if (isset($_GET['end']) && isDate($_GET['end']) == null) {
    echo alert(_('Date malformée, désolé'));
    $_GET['end'] = $last_per->last_day();
}
$end->value = isset($_GET['end']) ? $_GET['end'] : $last_per->last_day();
$r = td(_('Date fin'));
$r .= td($end->input());
echo tr($r);
// type of lettering : all, lettered, not lettered
$sel = new ISelect('type_let');
$sel->value = array(array('value' => 0, 'label' => _('Toutes opérations')), array('value' => 1, 'label' => _('Opérations lettrées')), array('value' => 3, 'label' => _('Opérations lettrées montants différents')), array('value' => 2, 'label' => _('Opérations NON lettrées')));
if (isset($_GET['type_let'])) {
    $sel->selected = $_GET['type_let'];
}
$r = td("Filtre ") . td($sel->input());
echo tr($r);
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:lettering.card.inc.php


示例16: build_search_sql


//.........这里部分代码省略.........
         $and = ' and ';
     } else {
         if ($p_action == 'quick_writing') {
             $p_action = 'ODS';
         }
         $aLedger = $g_user->get_ledger($p_action, 3);
         $fil_ledger = '';
         $sp = '';
         for ($i = 0; $i < count($r_jrn); $i++) {
             if (isset($r_jrn[$i])) {
                 $a = $r_jrn[$i];
                 $fil_ledger .= $sp . $a;
                 $sp = ',';
             }
         }
         $fil_ledger = ' jrn_def_id in (' . $fil_ledger . ')';
         $and = ' and ';
         /* no ledger selected */
         if ($sp == '') {
             $fil_ledger = '';
             $and = '';
         }
     }
     /* format the number */
     $amount_min = abs(toNumber($amount_min));
     $amount_max = abs(toNumber($amount_max));
     if ($amount_min > 0 && isNumber($amount_min)) {
         $fil_amount = $and . ' jr_montant >=' . $amount_min;
         $and = ' and ';
     }
     if ($amount_max > 0 && isNumber($amount_max)) {
         $fil_amount .= $and . ' jr_montant <=' . $amount_max;
         $and = ' and ';
     }
     /* -------------------------------------------------------------------------- *
      * if both amount are the same then we need to search into the detail
      * and we reset the fil_amount
      * -------------------------------------------------------------------------- */
     if (isNumber($amount_min) && isNumber($amount_max) && $amount_min > 0 && bccomp($amount_min, $amount_max, 2) == 0) {
         $fil_amount = $and . ' ( ';
         // Look in detail
         $fil_amount .= 'jr_grpt_id in ( select distinct j_grpt from jrnx where j_montant = ' . $amount_min . ') ';
         //and the total operation
         $fil_amount .= ' or ';
         $fil_amount .= ' jr_montant = ' . $amount_min;
         $fil_amount .= ')';
         $and = " and ";
     }
     // date
     if (isset($date_start) && isDate($date_start) != null) {
         $fil_date = $and . " jr_date >= to_date('" . $date_start . "','DD.MM.YYYY')";
         $and = " and ";
     }
     if (isset($date_end) && isDate($date_end) != null) {
         $fil_date .= $and . " jr_date <= to_date('" . $date_end . "','DD.MM.YYYY')";
         $and = " and ";
     }
     // date paiement
     if (isset($date_paid_start) && isDate($date_paid_start) != null) {
         $fil_date_paid = $and . " jr_date_paid >= to_date('" . $date_paid_start . "','DD.MM.YYYY')";
         $and = " and ";
     }
     if (isset($date_paid_end) && isDate($date_paid_end) != null) {
         $fil_date_paid .= $and . " jr_date_paid <= to_date('" . $date_paid_end . "','DD.MM.YYYY')";
         $and = " and ";
     }
     // comment
     if (isset($desc) && $desc != null) {
         $desc = sql_string($desc);
         $fil_desc = $and . " ( upper(jr_comment) like upper('%" . $desc . "%') or upper(jr_pj_number) like upper('%" . $desc . "%') " . " or upper(jr_internal)  like upper('%" . $desc . "%')\n                          or jr_grpt_id in (select j_grpt from jrnx where j_text ~* '" . $desc . "')\n                          or jr_id in (select jr_id from jrn_info where ji_value is not null and ji_value ~* '{$desc}')\n                          )";
         $and = " and ";
     }
     //    Poste
     if (isset($accounting) && $accounting != null) {
         $fil_account = $and . "  jr_grpt_id in (select j_grpt\n                         from jrnx where j_poste::text like '" . sql_string($accounting) . "%' )  ";
         $and = " and ";
     }
     // Quick Code
     if (isset($qcodesearch_op)) {
         $qcode = $qcodesearch_op;
     }
     if (isset($qcode) && $qcode != null) {
         $fil_qcode = $and . "  jr_grpt_id in ( select j_grpt from\n                       jrnx where trim(j_qcode) = upper(trim('" . sql_string($qcode) . "')))";
         $and = " and ";
     }
     // Only the unpaid
     if (isset($unpaid)) {
         $fil_paid = $and . SQL_LIST_UNPAID_INVOICE;
         $and = " and ";
     }
     $g_user = new User(new Database());
     $g_user->Check();
     $g_user->check_dossier(dossier::id());
     if ($g_user->admin == 0 && $g_user->is_local_admin() == 0) {
         $fil_sec = $and . " jr_def_id in ( select uj_jrn_id " . " from user_sec_jrn where " . " uj_login='" . $_SESSION['g_user'] . "'" . " and uj_priv in ('R','W'))";
     }
     $where = $fil_ledger . $fil_amount . $fil_date . $fil_desc . $fil_sec . $fil_amount . $fil_qcode . $fil_paid . $fil_account . $fil_date_paid;
     $sql .= " where " . $where;
     return array($sql, $where);
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:101,代码来源:class_acc_ledger.php


示例17: operation_update_date_limit

 function operation_update_date_limit($p_text)
 {
     if (isDate($p_text) == null) {
         $p_text = null;
     }
     $sql = "update jrn set jr_ech=to_date(\$1,'DD.MM.YYYY') where jr_id=\$2";
     $this->db->exec_sql($sql, array($p_text, $this->jr_id));
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:8,代码来源:class_acc_operation.php


示例18: dates

 }
 /*
  * If something was entered in the URL box, it overrides any other URL
  * (even the url when the files is copied, or when the option is checked
  * to use the URL from the torrent's file name.)
  */
 if (isset($_POST["url"])) {
     if (strlen($_POST["url"]) > 0) {
         $url = $_POST["url"];
     }
 }
 /*
  * Check the dates to make sure they are legitimate dates.
  * If not, display a warning and don't add it to the database.
  */
 if (!isDate($removeurldate, true) || !isDate($hidetorrentdate, true)) {
     $statusMsg .= "ERROR: A date is invalid. Please use the format yyyy-mm-dd for dates (ie. '2004-03-24')";
 } else {
     /*
      * Trying to stay HTML compliant is a pain in the ass sometimes.
      */
     if (!get_magic_quotes_gpc()) {
         /*
          * PHP isn't adding slashes to the the POST results, so convert the strings
          * to HTML-compatible and run addslashes to be a compatible query
          * string
          */
         $filename = addslashes(htmlentities($filename));
         $url = addslashes(htmlentities($url));
         $threshold = addslashes(htmlentities($threshold));
         $strategy = addslashes(htmlentities($strategy));
开发者ID:pombredanne,项目名称:BittorrentDigitalPreservation,代码行数:31,代码来源:bta_add.php


示例19: isset

 $valid->isFloat('sumtotal');
 $valid->isFloat('brokerrevenue');
 $valid->isFloat('stopprice');
 $valid->isFloat('takeprice');
 $valid->removeTags('comment');
 $valid->noFilter('ordate');
 $valid->noFilter('ortype');
 $valid->noFilter('exchange');
 $valid->noFilter('company');
 $valid->noFilter('quote');
 $valid->noFilter('currency');
 //$valid->useEntities('comment');
 $validate = $valid->validateInput();
 $missing = $valid->getMissing();
 $errors = $valid->getErrors();
 if (!isDate($_POST['ordate'])) {
     $errors['ordate'] = "Invalid data supplied. Correct date format YYYY-mm-dd";
 }
 $insertOK = false;
 if (!$errors && !$missing) {
     $redirect = 'http://localhost/stocks_oop/dashboard/index.php';
     $stoploss = isset($_POST['stoploss']) ? 1 : 0;
     $takeprofit = isset($_POST['takeprofit']) ? 1 : 0;
     $sql = "INSERT INTO orders\r\n                        (ordate,\r\n                        ortype,\r\n                        brokerid,\r\n                        exchid,\r\n                        companyid,\r\n                        qid,\r\n                        amount,\r\n                        currencyid,\r\n                        price,\r\n                        stoploss,\r\n                        stopprice,\r\n                        takeprofit,\r\n                        takeprice,\r\n                        amountlot,\r\n                        total,\r\n                        brokerrevenue,\r\n                        orcomment,\r\n                        parentid,\r\n                        changedate,\r\n                        activeflag,\r\n                        accountid)\r\n                    VALUES\r\n                        (:ordate,\r\n                        :ortype,\r\n                        1,\r\n                        :exchid,\r\n                        :companyid,\r\n                        :qid,\r\n                        :amount,\r\n                        :currencyid,\r\n                        :price,\r\n                        :stoploss,\r\n                        :stopprice,\r\n                        :takeprofit,\r\n                        :takeprice,\r\n                        :amountlot,\r\n                        :total,\r\n                        :brokerrevenue,\r\n                        :orcomment,\r\n                        NULL,\r\n                        NOW(),\r\n                        1,\r\n                        1)";
     try {
         $stmt = $pdo->prepare($sql);
         $stmt->bindParam(':ordate', $_POST['ordate']);
         $stmt->bindParam(':ortype', $_POST['ortype']);
         $stmt->bindParam(':exchid', $_POST['exchange']);
         $stmt->bindParam(':companyid', $_POST['company']);
         $stmt->bindParam(':qid', $_POST['quote']);
开发者ID:soanni,项目名称:stocks_oop,代码行数:31,代码来源:order.html.php


示例20: Acc_Ledger_Info

 }
 /* Show button  */
 echo '<h1 style="float:right;margin-right:20%"> Enregistrement </h1>';
 echo $Ledger->confirm($_POST, true);
 /* Show link for Invoice */
 if (isset($Ledger->doc)) {
     echo '<h2>Document </h2>';
     echo $Ledger->doc;
 }
 /* Save the additional information into jrn_info */
 $obj = new Acc_Ledger_Info($cn);
 $obj->save_extra($Ledger->jr_id, $_POST);
 // extourne
 if (isset($_POST['reverse_ck'])) {
     $p_date = HtmlInput::default_value_post('reverse_date', '');
     if (isDate($p_date) == $p_date) {
         // reverse the operation
         try {
             $Ledger->reverse($p_date);
             echo '<p>';
             echo _('Extourné au ') . $p_date;
             echo '</p>';
         } catch (Exception $e) {
             echo '<p class="notice">' . _('Opération non extournée') . $e->getMessage() . '</p>';
         }
     } else {
         // warning because date is invalid
         echo '<p class="notice">' . _('Date invalide, opération non extournée') . '</p>';
     }
 }
 echo $Ledger->button_new_operation();
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:compta_ven.inc.php



注:本文中的isDate函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP isDebug函数代码示例发布时间:2022-05-15
下一篇:
PHP isCrawler函数代码示例发布时间: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