本文整理汇总了PHP中leap_mysqldate函数的典型用法代码示例。如果您正苦于以下问题:PHP leap_mysqldate函数的具体用法?PHP leap_mysqldate怎么用?PHP leap_mysqldate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了leap_mysqldate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: log
public static function log($str)
{
$n = new LangModel();
$n->lang_id = $str;
$n->lang_ts = leap_mysqldate();
$n->save();
}
示例2: overwriteForm
public function overwriteForm($return, $returnfull)
{
$return = parent::overwriteForm($return, $returnfull);
$resto = new MasterRestaurantModel();
$res = $resto->getAll();
foreach ($res as $value) {
$arrHelp[$value->id_restaurant] = $value->name;
}
$return['id_restaurant'] = new Leap\View\InputSelect($arrHelp, "id_restaurant", "id_restaurant", $this->id_restaurant);
$bank = new BankModel();
$arrBank = $bank->getAll();
foreach ($arrBank as $value) {
$arrHelpBank[$value->id_bank] = $value->bank_name;
}
$return['id_bank'] = new Leap\View\InputSelect($arrHelpBank, "id_bank", "id_bank", $this->id_bank);
if (!isset($this->start)) {
$dt = leap_mysqldate();
} else {
$dt = $this->start;
}
$return['start'] = new \Leap\View\InputText("date", "start", "start", $dt);
if (!isset($this->end)) {
$dt = leap_mysqldate();
} else {
$dt = $this->end;
}
$return['end'] = new \Leap\View\InputText("date", "end", "end", $dt);
return $return;
}
示例3: overwriteForm
public function overwriteForm($return, $returnfull)
{
$return = parent::overwriteForm($return, $returnfull);
$resto = new MasterRestaurantModel();
$res = $resto->getAll();
foreach ($res as $value) {
$arrHelp[$value->id_restaurant] = $value->name;
}
$return['id_restaurant'] = new Leap\View\InputSelect($arrHelp, "id_restaurant", "id_restaurant", $this->id_restaurant);
$bank = new BankModel();
$return['end_mr_fee'] = new \Leap\View\InputText("date", "end_mr_fee", "end_mr_fee", $dt);
$return['fee'] = new Leap\View\InputTextRightAddOn("text", "fee", "fee", " % ", $this->fee);
$return['mr_fee_select'] = new Leap\View\InputRadioButtonHideWhen(array(1 => "Yes", 0 => "No"), "mr_fee_select", "mr_fee_select", $this->mr_fee_select, array(1 => "formgroup_start_mr_fee,formgroup_end_mr_fee", 0 => "formgroup_start_mr_fee,formgroup_end_mr_fee"));
if ($this->mr_fee_select == 0) {
if (!isset($this->start_mr_fee)) {
$dt = leap_mysqldate();
} else {
$dt = $this->start_mr_fee;
}
$return['start_mr_fee'] = new \Leap\View\InputText("date", "start_mr_fee", "start_mr_fee", $dt);
if (!isset($this->end_mr_fee)) {
$dta = leap_mysqldate();
} else {
$dta = $this->end_mr_fee;
}
$return['end_mr_fee'] = new \Leap\View\InputText("date", "end_mr_fee", "end_mr_fee", $dta);
} else {
}
return $return;
}
示例4: overwriteForm
public function overwriteForm($return, $returnfull)
{
$return = parent::overwriteForm($return, $returnfull);
$return['topic_author'] = new Leap\View\InputText("hidden", "topic_author", "topic_author", Account::getMyID());
if ($_GET['load']) {
$return['topic_date'] = new Leap\View\InputText("hidden", "topic_date", "topic_date", $this->topic_date);
} else {
$return['topic_date'] = new Leap\View\InputText("hidden", "topic_date", "topic_date", leap_mysqldate());
}
$return['topic_msg'] = new Leap\View\InputTextRTE("topic_msg", "topic_msg", $this->topic_msg);
$return['topic_status'] = new Leap\View\InputSelect(array("draft" => "Draft", "publish" => "Publish"), "topic_status", "topic_status", $this->topic_status);
$return['topic_modified'] = new Leap\View\InputText("hidden", "topic_modified", "topic_modified", leap_mysqldate());
$return['topic_image'] = new \Leap\View\InputFoto("topic_image", "topic_image", $this->topic_image);
$return['topic_fb_og_image'] = new \Leap\View\InputFoto("topic_fb_og_image", "topic_fb_og_image", $this->topic_fb_og_image);
$return['topic_category'] = new \Leap\View\InputTag("BlogBE/prefetchBlogCat", "topic_category", "topic_category", $this->topic_category);
// $return['spdivider']['post_image'] = "Content";
$return['spdivider']['topic_meta_title'] = "SEO";
$return['spdivider']['topic_fb_og_title'] = "FB OpenGraph";
$return['spdivider']['topic_attachments'] = "Attachments";
$return['topic_attachments'] = new Leap\View\InputPageAttachment("topic_attachments", "topic_attachments", $this->topic_attachments);
if ($this->topic_attachment_order == "") {
$this->topic_attachment_order = Efiwebsetting::getData('PageAttachment');
}
$return['topic_attachment_order'] = new Leap\View\InputOrdering("topic_attachment_order", "topic_attachment_order", $this->topic_attachment_order);
return $return;
}
示例5: saveSLog
static function saveSLog($word)
{
$sl = new MSearchLog();
$sl->slog_keyword = $word;
$sl->slog_date = leap_mysqldate();
$sl->save();
}
示例6: moveStock
public static function moveStock($prod_id, $jumlah, $minus = 1, $note = "", $po_id = 0)
{
$prod = new ProdModel();
$prod->getByID($prod_id);
//isi log
$ps = new ProdStok();
$ps->stok_date = leap_mysqldate();
$ps->stok_prev = $prod->prod_stock;
$ps->stok_po_id = $po_id;
$ps->stok_prod_id = $prod->prod_id;
$ps->stok_userid = Account::getMyID();
if ($minus) {
//kurangi stok
$prod->prod_stock -= $jumlah;
} else {
//kurangi stok
$prod->prod_stock += $jumlah;
}
$prod->load = 1;
$prod->save();
if (Role::hasRole('admin')) {
$ps->stock_admin = 1;
}
$ps->stock_note = $note;
$ps->stok_actual = $prod->prod_stock;
if ($ps->stok_prev > $ps->stok_actual) {
$ps->stok_debit_credit = 1;
} else {
$ps->stok_debit_credit = 0;
}
return $ps->save();
}
示例7: simpan
static function simpan($varID, $type)
{
$mp = new MProdLog();
$mp->plog_date = leap_mysqldate();
$mp->plog_variantID = $varID;
$mp->plog_type = $type;
$mp->save();
}
示例8: sendReplyMsg
function sendReplyMsg()
{
$json['bool'] = 0;
$json['err'] = "ok";
//$accid = addslashes($_POST['acc_id']);
$inboxid = addslashes($_POST['inboxid']);
$isi = addslashes($_POST['isi']);
// $emai = addslashes($_POST['emai']);
/* if ($accid == "") {
$json['err'] = Lang::t('lang_id_empty');
}*/
if ($inboxid == "") {
$json['err'] = Lang::t('lang_inbox_id_empty');
}
if ($isi == "") {
$json['err'] = Lang::t('lang_isi_empty');
}
if ($json['err'] == "ok") {
$in = new ChatMsg();
//$tgl = date("Y-m-d H:i:s");
$in->chat_group_id = $inboxid;
//$in->inbox_to = $accid;
$in->inbox_from = Account::getMyID();
$in->inbox_msg = $isi;
$in->inbox_createdate = leap_mysqldate();
if ($in->save()) {
//update inbox
$inbox = new ChatGroup();
$inbox->getByID($inboxid);
$inbox->inbox_changedate = leap_mysqldate();
$inbox->inbox_anzahlreply++;
$inbox->load = 1;
//ini hrs di foreach untuk semua member
$m = new ChatMember();
$arrMember = $m->getWhere("chat_group_id = '{$inboxid}'");
foreach ($arrMember as $mem) {
$accid = $mem->chat_member_id;
if ($accid == Account::getMyID()) {
continue;
}
$inbox->addInboxNotifPortal($accid, $inboxid);
//cek read didalamnya
}
if ($inbox->inbox_read) {
//update Notif
$inbox->inbox_read = 0;
}
//$inbox->inbox_giliran_read = $accid;
$inbox->save();
$json['bool'] = 1;
} else {
$json['err'] = Lang::t('lang_failed');
}
}
echo json_encode($json);
exit;
}
示例9: savelog
static function savelog($camp_id, $device_id, $acc_id, $status, $log_text, $log_multicast_id)
{
$nl = new PushLogger();
$nl->log_camp_id = $camp_id;
$nl->log_device_id = $device_id;
$nl->log_macc_id = $acc_id;
$nl->log_status = $status;
$nl->log_text = $log_text;
$nl->log_multicast_id = $log_multicast_id;
$nl->log_date = leap_mysqldate();
return $nl->save();
}
示例10: overwriteForm
public function overwriteForm($return, $returnfull)
{
$return = parent::overwriteForm($return, $returnfull);
if (!isset($this->datetime_order)) {
$dt = leap_mysqldate();
} else {
$dt = $this->datetime_order;
}
$return['datetime_order'] = new \Leap\View\InputText("date", "datetime_order", "datetime_order", $dt);
foreach ($return as $key => $val) {
$return[$key]->setReadOnly();
}
return $return;
}
示例11: overwriteForm
public function overwriteForm($return, $returnfull)
{
$return = parent::overwriteForm($return, $returnfull);
$return['carousel_photo'] = new \Leap\View\InputFoto("foto", "carousel_photo", $this->carousel_photo);
$return['carousel_active'] = new Leap\View\InputSelect($this->arrayYesNO, "carousel_active", "carousel_active", $this->carousel_active);
if (!isset($this->carousel_postdate)) {
$dt = leap_mysqldate();
} else {
$dt = $this->carousel_postdate;
}
$return['carousel_postdate'] = new \Leap\View\InputText("date", "carousel_postdate", "carousel_postdate", $dt);
$return['carousel_start'] = new \Leap\View\InputText("date", "carousel_start", "carousel_start", $this->carousel_start);
$return['carousel_end'] = new \Leap\View\InputText("date", "carousel_end", "carousel_end", $this->carousel_end);
return $return;
}
示例12: overwriteForm
public function overwriteForm($return, $returnfull)
{
$return = parent::overwriteForm($return, $returnfull);
$return['prog_content'] = new \Leap\View\InputTextRTE("prog_content", "prog_content", $this->prog_content);
$return['prog_pic'] = new \Leap\View\InputFoto("foto", "prog_pic", $this->prog_pic);
$return['prog_active'] = new Leap\View\InputSelect($this->arrayYesNO, "prog_active", "prog_active", $this->prog_active);
if (!isset($this->prog_date_created)) {
$dt = leap_mysqldate();
} else {
$dt = $this->prog_date_created;
}
$return['prog_date_created'] = new \Leap\View\InputText("date", "prog_date_created", "prog_date_created", $dt);
$return['prog_date_start'] = new \Leap\View\InputText("date", "prog_date_start", "prog_date_start", $this->prog_date_start);
$return['prog_date_end'] = new \Leap\View\InputText("date", "prog_date_end", "prog_date_end", $this->prog_date_end);
return $return;
}
示例13: sendEmail
public function sendEmail($to, $arrReplace)
{
$this->setVar($arrReplace);
$this->addTable();
$lep = new Leapmail2();
$hasil = $lep->sendHTMLEmail($to, $this->email_subject, $this->email_template_text, $this->email_template_html);
$suc = $hasil->success();
//should we log this ?
$ml = new EmailLog();
$ml->log_date = leap_mysqldate();
$ml->log_email_id = $to;
$ml->log_status = $suc;
$ml->log_template = $this->email_id;
$ml->save();
return $suc;
}
示例14: constraints
public function constraints()
{
$err = array();
if (!isset($this->session_id)) {
$err['session_id'] = Lang::t('session_id');
}
if (!isset($this->variant_id)) {
$err['variant_id'] = Lang::t('variant_id');
}
if (!isset($this->qty)) {
$err['qty'] = Lang::t('qty');
}
$this->date_created = leap_mysqldate();
$this->status = 1;
return $err;
}
示例15: requestCashOut
public function requestCashOut()
{
if (Efiwebsetting::getData('checkOAuth') == 'yes') {
IMBAuth::checkOAuth();
}
$idResto = Generic::mustCheck($_GET['id_restaurant'], "No ID Restaurant Found");
$amount = Generic::mustCheck($_GET['amount'], "No Amount Found");
if ($amount == "0") {
Generic::errorMsg("Zero Amount not Allowed");
}
$bankAcc = new RestoBankAccModel();
$arrBank = $bankAcc->getWhere("id_restaurant='{$idResto}'");
if (count($arrBank) <= 0) {
Generic::errorMsg("You Have Not Set Your Cash Out Account");
}
$req = new MasterCashOutRequestModel();
$arrReq = $req->getWhere("id_restaurant='{$idResto}' AND status='0'");
if (count($arrReq) > 0) {
Generic::errorMsg("You Already Request Cash Out");
}
$resto = new MasterRestaurantModel();
$resto->getByID($idResto);
$cashOut = new MasterCashOutRequestModel();
$cashOut->id_restaurant = $idResto;
$cashOut->datetime_request = leap_mysqldate();
$cashOut->amount = $amount;
$cashOut->status = 0;
$idNewRequest = $cashOut->save();
$tr = new MasterRestoTransactionModel();
$tr->id_request = $idNewRequest;
$tr->id_restaurant = $idResto;
$tr->gross_amount = (double) $amount * -1;
$tr->net_amount = (double) $amount * -1;
$tr->approved = "0";
$tr->type_transaction = "2";
$tr->datetime_transaction = leap_mysqldate();
$tr->mr_fee = 0;
$tr->credit_card_fee = 0;
$tr->other_fee = 0;
$tr->bank_disc = 0;
$tr->save();
$json['status_code'] = 1;
$json['results']['messages'] = "success";
echo json_encode($json);
die;
}