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

PHP getCurrentTimestamp函数代码示例

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

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



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

示例1: extract

<?php

/********************************************************************************************************************

#Coder       : Manoj Pandit

#Description : This Code is used to display list of all product and remove any on them 


*********************************************************************************************************************/
extract($_GET);
extract($_POST);
$obj_block = new common();
$currentTimestamp = getCurrentTimestamp();
if ($model_id != '' && $action == 'delete') {
    $logoname = $obj_block->getNameById(TBL__HTMLTEMPLATE, 'id=' . $model_id);
    /*if($logoname->image!='') {
    		@chmod(LIST_ROOT_ADMIN."/images/new_model/",0777);
    		unlink(LIST_ROOT_ADMIN."/images/new_model/".$logoname->image);
    				
    	}*/
    $deleteProduct = $obj_block->delete(TBL__HTMLTEMPLATE, 'id =' . $model_id);
    $_SESSION['msg'] = 'Car Template Successfully Deleted';
    unset($obj_block);
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/htmltemplate/index.php";</script>';
    exit;
}
$getBlock = $obj_block->read(TBL__HTMLTEMPLATE, '', ' creation_date DESC');
unset($obj_block);
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:29,代码来源:code.php


示例2: explode

    //--------------------------------------------//
    if ($error) {
        $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>";
    } else {
        $image = '';
        if ($_FILES["image"]["name"]) {
            $type = explode(".", $_FILES["image"]["name"]);
            if (end($type) == "png" || end($type) == "jpeg" || end($type) == "jpg" || end($type) == "gif") {
                $image = getCurrentTimestamp() . '-' . $_FILES["image"]["name"];
                //chmod(DEFAULT_ADMIN_URL."/images/used_car/image",0777);
                move_uploaded_file($_FILES["image"]["tmp_name"], LIST_ROOT_ADMIN . "/images/used_car/image/" . $image);
            }
        }
        $dispo = '';
        if ($_FILES["dispo"]["name"]) {
            $type = explode(".", $_FILES["dispo"]["name"]);
            if (end($type) == "png" || end($type) == "jpeg" || end($type) == "jpg" || end($type) == "gif") {
                $dispo = getCurrentTimestamp() . '-' . $_FILES["dispo"]["name"];
                //chmod(DEFAULT_ADMIN_URL."/images/used_car/dispo",0777);
                move_uploaded_file($_FILES["dispo"]["tmp_name"], LIST_ROOT_ADMIN . "/images/used_car/dispo/" . $dispo);
            }
        }
        $dataArr = array('model_name' => $model_name, 'brand_id' => $brand_id, 'year' => $year, 'image' => $image, 'dispo' => $dispo, 'prix' => $prix, 'publish' => $publish, 'creation_date' => $currentTimestamp);
        $add_product = $obj_block->save(TBL_USED_CAR, $dataArr);
        $_SESSION['msg'] = 'Car Successfully Added';
        redirectUrl(DEFAULT_ADMIN_URL . '/used_car/index.php');
        unset($obj_block);
        unset($obj);
        exit;
    }
}
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:31,代码来源:add_code.php


示例3: array

    }
    $filterarray[] = array('name' => 'ListingType', 'value' => $val, 'paramName' => '', 'paramValue' => '');
} else {
    $filterarray[] = array('name' => 'ListingType', 'value' => array('FixedPrice', 'StoreInventory', 'AuctionWithBIN', 'Auction'), 'paramName' => '', 'paramValue' => '');
}
$userTblName = 'temp_' . $_SESSION['unique_id'][0];
if (!isset($_SESSION['announces'])) {
    $common->customQuery('DROP TABLE IF EXISTS `' . $userTblName . '`');
    $common->customQuery('CREATE TABLE `' . $userTblName . '` (
							  `type` int(10) NOT NULL,
							  `itemId` bigint(20) NOT NULL,
							  `title` varchar(255) NOT NULL,
							  `Price` float NOT NULL,
							  `content` longtext
							) ENGINE=MyISAM DEFAULT CHARSET=latin1');
    $common->customQuery('INSERT INTO master_temp (user_id, tbl_name, lastAct) VALUES ("' . $_SESSION['unique_id'][0] . '","' . $userTblName . '",' . getCurrentTimestamp() . ')');
    $common->customQuery("DELETE FROM " . $userTblName);
}
if (!isset($_GET['page'])) {
    $_SESSION['announces'] = array();
    $_SESSION['announces']['fill'] = true;
    $page = 1;
    $_SESSION['announces']['page'] = 8;
    $_SESSION['announces']['fillfor'] = 1;
    $common->customQuery("DELETE FROM " . $userTblName);
} else {
    $DbPage = ceil($page / $_SESSION['announces']['page']);
    if ($_SESSION['announces']['fillfor'] != $DbPage) {
        $_SESSION['announces']['fill'] = true;
        $_SESSION['announces']['fillfor'] = $DbPage;
    }
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:announces_code-11-12-2013.php


示例4: Handle

$obj_handle = new Handle();
/* Get Current Date Time Stamp */
$currentTimestamp = getCurrentTimestamp();
if (isset($submit) && $submit != "" && $_SERVER['REQUEST_METHOD'] == 'POST') {
    $error = '';
    $obj->add_fields($title, 'req', 'Please Enter Title');
    $error = $obj->validate();
    $image = '';
    //--------------------------------------------//
    if ($error) {
        $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>";
    } else {
        if ($_FILES["logo"]["name"]) {
            $type = explode(".", $_FILES["logo"]["name"]);
            if (end($type) == "png" || end($type) == "jpeg" || end($type) == "jpg" || end($type) == "gif") {
                $image = getCurrentTimestamp() . '-' . $_FILES["logo"]["name"];
                //chmod(DEFAULT_ADMIN_URL."/images/brands",0777);
                move_uploaded_file($_FILES["logo"]["tmp_name"], LIST_ROOT_ADMIN . "/images/brands/" . $image);
            }
        }
        $dataArr = array('title' => $title, 'logo' => $image, 'publish' => $publish, 'creation_date' => $currentTimestamp);
        $add_product = $obj_block->save(TBL_BRANDS, $dataArr);
        $_SESSION['msg'] = 'Brand Successfully Added';
        redirectUrl(DEFAULT_ADMIN_URL . '/brands/index.php');
        unset($obj_block);
        unset($obj);
        exit;
    }
}
?>
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:30,代码来源:add_code.php


示例5: AddCar

 public function AddCar($arrPost, $arrFiles, $edit = false, $car_id = '')
 {
     global $db;
     if ($edit) {
         $result = $this->customQuery("SELECT car_id FROM car WHERE stock_id= '" . $arrPost['stock_id'] . "' and vin = '" . $arrPost['vin'] . "'");
         if (mysql_num_rows($result) == 0) {
             $arr = array("stock_id" => $arrPost[stock_id], "vin" => $arrPost[vin], "updated_at" => getCurrentTimestamp());
             $this->update("car", $arr, "car_id = " . $car_id);
             unset($arrPost['stock_id']);
             unset($arrPost['vin']);
         } else {
             $result_id = $db->fetchNextObject($result);
             if ($car_id != $result_id->car_id) {
                 $this->error .= 'Stock Id and VIN Duplicate.' . '<br>';
                 return false;
             } else {
                 $arr = array("stock_id" => $arrPost[stock_id], "vin" => $arrPost[vin], "updated_at" => getCurrentTimestamp());
                 if (!empty($arrPost['brand_id'])) {
                     $arr['brand_id'] = $arrPost['brand_id'];
                 }
                 $this->update("car", $arr, "car_id = " . $car_id);
                 unset($arrPost['stock_id']);
                 if (!empty($arrPost['brand_id'])) {
                     unset($arrPost['brand_id']);
                 }
                 unset($arrPost['vin']);
             }
         }
         // deleted images
         if (!empty($arrPost['deleted_img'])) {
             foreach ($arrPost['deleted_img'] as $image) {
                 $resultImage = $this->customQuery("DELETE FROM `car_media_gallery` WHERE `car_media_gallery`.`value` = '" . $image . "' LIMIT 1");
                 unlink(UPLOAD_CAR_IMAGES . '/' . $image);
             }
         }
     } else {
         $result = $this->customQuery("SELECT car_id FROM car WHERE stock_id= '" . $arrPost['stock_id'] . "' and vin = '" . $arrPost['vin'] . "'");
         if (mysql_num_rows($result) == 0) {
             $arr = array("stock_id" => $arrPost[stock_id], "vin" => $arrPost[vin], "created_at" => getCurrentTimestamp());
             if (!empty($arrPost['brand_id'])) {
                 $arr['brand_id'] = $arrPost['brand_id'];
             }
             if (!empty($_REQUEST['type']) && $_REQUEST['type'] == 'nostock') {
                 $arr['site_name'] = 2;
             }
             $car_id = $this->save("car", $arr);
             unset($arrPost['stock_id']);
             unset($arrPost['vin']);
             unset($arrPost['brand_id']);
             unset($arrPost['site_name']);
         } else {
             $this->error .= 'Stock Id and VIN Duplicate.' . '<br>';
             return false;
         }
     }
     $attributes = $this->getAttributes();
     foreach ($arrPost as $key => $value) {
         if ($key == "submit") {
             break;
         }
         if ($value == '') {
             continue;
         }
         if ($attributes[$key]["front"] == "select") {
             if ($value == 'other') {
                 $arr = array("attribute_id" => $attributes[$key]["id"], "value" => $arrPost[$key . "_other"]);
                 $value = $this->save("attribute_option_value", $arr);
                 unset($arrPost[$key . "_other"]);
             }
         }
         $arr = array("attribute_id" => $attributes[$key]["id"], "car_id" => $car_id, "value" => $value);
         if (!empty($attributes[$key]["id"])) {
             $result = $this->customQuery("SELECT value_id FROM car_" . $attributes[$key]["back"] . " WHERE\n\t\t\t\t\t\t\t     attribute_id= '" . $attributes[$key]["id"] . "' and\n\t\t\t\t\t\t\t     car_id = '" . $car_id . "'");
             $exists = mysql_fetch_array($result);
             if (!empty($exists['value_id'])) {
                 $value = $this->update("car_" . $attributes[$key]["back"], $arr, "value_id = " . $exists['value_id']);
             } else {
                 $value = $this->save("car_" . $attributes[$key]["back"], $arr);
             }
         }
     }
     $j = 1;
     $counter = 0;
     foreach ($arrFiles['images']['name'] as $file) {
         $path = $this->getUploadDirPath($file);
         if (move_uploaded_file($arrFiles['images']["tmp_name"][$counter], UPLOAD_CAR_IMAGES . '/' . $path)) {
             $arr = array("attribute_id" => $attributes['images']["id"], "car_id" => $car_id, "value" => $path, "fetched" => 1);
             $value = $this->save("car_" . $attributes['images']["back"], $arr);
             $arr = array("value_id" => $value, "position" => $j++);
             $value = $this->save("car_" . $attributes['images']["back"] . "_value", $arr);
         } else {
             $this->error .= 'Cannot Upload File.<br>';
         }
         $counter++;
     }
     return true;
 }
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:97,代码来源:AdminCarFormClass.php


示例6: time

    //$obj->add_fields($model, 'req', 'Please select a Model');
    $obj->add_fields($year, 'req', 'Please Enter year');
    $obj->add_fields($expert, 'req', 'Please Enter Excerpt');
    $obj->add_fields($ensemble, 'req', 'Please Enter Ensemble');
    $obj->add_fields($characteristique, 'req', 'Please Enter Characteristique');
    $obj->add_fields($_FILES['image']['name'], 'req', 'Please Upload Image');
    $obj->add_fields($_FILES['image'], 'ftype=jpg,gif,png', 'Please Upload Valid Image');
    $error = $obj->validate();
    //echo "<pre>";
    //print_r($error); die;
    if ($error) {
        $errorMsg = "<font color='#FF0000' family='verdana' size=2>Please fill all required fields.</font>";
    } else {
        $make_name = $makes[$make];
        $models_new = $getEntityObj->getEntityOutput($make, 4);
        $model_name = $models_new[$model];
        $image_name = time() . '-' . $_FILES['image']['name'];
        //$path = LIST_ROOT.'/images/reviews/media/';
        $path = LIST_ROOT_ADMIN_REVIEW_IMAGEPATH . '/';
        move_uploaded_file($_FILES["image"]["tmp_name"], $path . $image_name);
        $_SESSION['success_msg'] = 'New review has been saved successfully.';
        $dataArr = array('short_description' => $short_description, 'old_new' => $old_new, 'editorial' => $editorial, 'pdsf' => $pdsf, 'mpg' => $mpg, 'image' => $image_name, 'make' => $make, 'model' => $model, 'year' => $year, 'expert' => $expert, 'ensemble' => $ensemble, 'characteristique' => $characteristique, 'updated' => getCurrentTimestamp(), 'make_name' => $make_name, 'model_name' => $model_name);
        $review_id = $obj_setting->save('reviews', $dataArr);
        foreach ($medias as $media) {
            $dataArrMedia = array('review_id' => $review_id, 'media_type' => $media['mediatype'], 'order_id' => $media['order'], 'media_name' => $media['value'], 'updated' => getCurrentTimestamp());
            $review_media_id = $obj_setting->save('reviews_media', $dataArrMedia);
        }
        echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/reviews";</script>';
        exit;
    }
}
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:31,代码来源:page_add_code.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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