当前位置: 首页>>代码示例>>PHP>>正文


PHP date::getDate方法代码示例

本文整理汇总了PHP中date::getDate方法的典型用法代码示例。如果您正苦于以下问题:PHP date::getDate方法的具体用法?PHP date::getDate怎么用?PHP date::getDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在date的用法示例。


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

示例1:

           $req = Sql_Query(sprintf('select id from %s
 where bouncecount > %d', $tables['user'], $num));
           $total = Sql_Affected_Rows();
           $action_result .= "<br/>{$total} " . $GLOBALS['I18N']->get('subscribers apply') . '<br/>';
           $todo = 'deleteUser';
           break;
       case 'blacklist':
           $action_result .= $GLOBALS['I18N']->get('Blacklisting subscribers with more than') . ' ' . $num . ' ' . $GLOBALS['I18N']->get('bounces');
           $req = Sql_Query(sprintf('select id from %s
 where bouncecount > %d', $tables['user'], $num));
           $total = Sql_Affected_Rows();
           $action_result .= "<br/>{$total} " . $GLOBALS['I18N']->get('subscribers apply') . '<br/>';
           $todo = 'addUserToBlackListID';
           break;
       case 'resendconfirm':
           $fromval = $from->getDate('from');
           $toval = $from->getDate('to');
           $action_result .= $GLOBALS['I18N']->get('Resending request for confirmation to subscribers who signed up after') . ' ' . $fromval . ' ' . $GLOBALS['I18N']->get('and before') . ' ' . $toval;
           $req = Sql_Query(sprintf('select id from %s
 where entered > "%s" and entered < "%s" and !confirmed', $tables['user'], $fromval, $toval));
           $total = Sql_Affected_Rows();
           $action_result .= "<br/>{$total} " . $GLOBALS['I18N']->get('subscribers apply') . '<br/>';
           $todo = 'resendConfirm';
           break;
       case 'deleteunconfirmed':
           $fromval = $from->getDate('from');
           $toval = $from->getDate('to');
           $action_result .= $GLOBALS['I18N']->get('Deleting unconfirmed subscribers who signed up after') . ' ' . $fromval . ' ' . $GLOBALS['I18N']->get('and before') . ' ' . $toval;
           $req = Sql_Query(sprintf('select id from %s
 where entered > "%s" and entered < "%s" and !confirmed', $tables['user'], $fromval, $toval));
           $total = Sql_Affected_Rows();
开发者ID:gillima,项目名称:phplist3,代码行数:31,代码来源:reconcileusers.php

示例2: getConfig

} else {
    $from = $_POST["from"];
}
if (preg_match("/\n|\r/", $_POST["msgsubject"])) {
    $subject = "";
} else {
    $subject = $_POST["msgsubject"];
}
$message = $_POST["message"];
// If the variable isn't filled in, then the input fields don't default to the
// values selected.  Need to fill it in so a post will correctly display.
if (isset($_POST['year']) && is_array($_POST["year"]) || $_POST["embargo"] || $_POST["embargo"] == "0000-00-00 00:00:00") {
    $_POST["embargo"] = $embargo->getDate() . " " . $embargo->getTime() . ':00';
}
if (isset($_POST['year']) && is_array($_POST["year"]) || !$_POST["repeatuntil"] || $_POST["repeatuntil"] == "0000-00-00 00:00:00") {
    $_POST["repeatuntil"] = $repeatuntil->getDate() . " " . $repeatuntil->getTime() . ':00';
}
if (!isset($_SESSION["fckeditor_height"])) {
    $_SESSION["fckeditor_height"] = getConfig("fckeditor_height");
}
if (isset($_POST['expand']) && $_POST["expand"]) {
    // request to expand editor area
    //  $defaultheight = getConfig("fckeditor_height");
    //  SaveConfig("fckeditor_height",$curheight+100,1);
    $_SESSION["fckeditor_height"] += 100;
}
if (isset($_REQUEST['prepare'])) {
    $prepare = $_REQUEST['prepare'];
} else {
    $prepare = '';
}
开发者ID:kvervo,项目名称:phplist-aiesec,代码行数:31,代码来源:send_core.php

示例3: dirname

        $listselect_where = ' where owner = 0';
        break;
}
require dirname(__FILE__) . '/structure.php';
if (isset($_POST['processexport'])) {
    if (!verifyToken()) {
        ## csrf check
        print Error($GLOBALS['I18N']->get('Invalid security token. Please reload the page and try again.'));
        return;
    }
    $_SESSION['export'] = array();
    $_SESSION['export']['column'] = $_POST['column'];
    $_SESSION['export']['cols'] = $_POST['cols'];
    $_SESSION['export']['attrs'] = $_POST['attrs'];
    $_SESSION['export']['fromdate'] = $from->getDate("from");
    $_SESSION['export']['todate'] = $to->getDate("to");
    $_SESSION['export']['list'] = $list;
    print '<p>' . s('Processing export, this may take a while. Please wait') . '</p>';
    print $GLOBALS['img_busy'];
    print '<div id="progresscount" style="width: 200; height: 50;">Progress</div>';
    print '<br/> <iframe id="export" src="./?page=pageaction&action=export&ajaxed=true' . addCsrfGetToken() . '" scrolling="no" height="50"></iframe>';
    return;
}
if ($list) {
    print sprintf($GLOBALS['I18N']->get('Export subscribers on %s'), ListName($list));
}
print formStart();
$checked = 'entered';
if (isset($_GET['list']) && $_GET['list'] == 'all') {
    $checked = 'nodate';
}
开发者ID:narareddy,项目名称:phplist3,代码行数:31,代码来源:export.php

示例4:

 left join %s on %s.id = %s.userid
 where userid is NULL', $tables["user"], $tables["user"], $tables["listuser"], $tables["user"], $tables["listuser"]));
           $total = Sql_Affected_Rows();
           $action_result .= "<br/>{$total} " . $GLOBALS['I18N']->get('subscribers apply') . "<br/>";
           $todo = "moveUser";
           break;
       case "bounces":
           $action_result .= $GLOBALS['I18N']->get("Deleting subscribers with more than") . " " . $num . " " . $GLOBALS['I18N']->get('bounces');
           $req = Sql_Query(sprintf('select id from %s
 where bouncecount > %d', $tables["user"], $num));
           $total = Sql_Affected_Rows();
           $action_result .= "<br/>{$total} " . $GLOBALS['I18N']->get('subscribers apply') . "<br/>";
           $todo = "deleteUser";
           break;
       case "resendconfirm":
           $fromval = $from->getDate("from");
           $toval = $from->getDate("to");
           $action_result .= $GLOBALS['I18N']->get("Resending request for confirmation to subscribers who signed up after") . ' ' . $fromval . ' ' . $GLOBALS['I18N']->get('and before') . ' ' . $toval;
           $req = Sql_Query(sprintf('select id from %s
 where entered > "%s" and entered < "%s" and !confirmed', $tables["user"], $fromval, $toval));
           $total = Sql_Affected_Rows();
           $action_result .= "<br/>{$total} " . $GLOBALS['I18N']->get('subscribers apply') . "<br/>";
           $todo = "resendConfirm";
           break;
       case "deleteunconfirmed":
           $fromval = $from->getDate("from");
           $toval = $from->getDate("to");
           $action_result .= $GLOBALS['I18N']->get("Deleting unconfirmed subscribers who signed up after") . ' ' . $fromval . ' ' . $GLOBALS['I18N']->get('and before') . ' ' . $toval;
           $req = Sql_Query(sprintf('select id from %s
 where entered > "%s" and entered < "%s" and !confirmed', $tables["user"], $fromval, $toval));
           $total = Sql_Affected_Rows();
开发者ID:juvenal,项目名称:PHPlist,代码行数:31,代码来源:reconcileusers.php

示例5: dirname

        $ownerselect_where = ' where owner = 0';
        break;
}
require dirname(__FILE__) . '/structure.php';
if (isset($_POST['processexport'])) {
    if (!verifyToken()) {
        ## csrf check
        print Error($GLOBALS['I18N']->get('Invalid security token. Please reload the page and try again.'));
        return;
    }
    $_SESSION['export'] = array();
    $_SESSION['export']['column'] = $_POST['column'];
    $_SESSION['export']['cols'] = $_POST['cols'];
    $_SESSION['export']['attrs'] = $_POST['attrs'];
    $_SESSION['export']['fromdate'] = $from->getDate('from');
    $_SESSION['export']['todate'] = $to->getDate('to');
    $_SESSION['export']['list'] = $list;
    print '<p>' . s('Processing export, this may take a while. Please wait') . '</p>';
    print $GLOBALS['img_busy'];
    print '<div id="progresscount" style="width: 200; height: 50;">Progress</div>';
    print '<br/> <iframe id="export" src="./?page=pageaction&action=export&ajaxed=true' . addCsrfGetToken() . '" scrolling="no" height="50"></iframe>';
    return;
}
if ($list) {
    print s('Export subscribers on %s', ListName($list));
}
print formStart();
$checked = 'entered';
if (isset($_GET['list']) && $_GET['list'] == 'all') {
    $checked = 'nodate';
}
开发者ID:gillima,项目名称:phplist3,代码行数:31,代码来源:export.php

示例6: elseif

	$from = $_POST["from"];
}
if (preg_match("/[\n|\r]/",$_POST["subject"])) {
	$subject = "";
} else {
	$subject = $_POST["subject"];
}

// If the valiable isn't filled in, then the input fields don't default to the 
// values selected.  Need to fill it in so a post will correctly display.
if (!$_POST["embargo"]) {
	$_POST["embargo"] = $embargo->getDate() ." ".$embargo->getTime();
}

if (!$_POST["repeatuntil"]) {
	$_POST["repeatuntil"] = $repeatuntil->getDate() ." ".$repeatuntil->getTime();
}

if ((($send && is_array($_POST["list"])) || $save || $sendtest || $prepare) && $subject && $_POST["message"] && $from && !$duplicate_attribute) {

  if ($save || $sendtest) {
		// We're just saving, not sending.
		if ($_POST["status"] == "") {
			// No status - move to draft state
	    $status = "draft";
		} else {
			// Keep the status the same
			$status = $_POST["status"];
		}
	} elseif ($send) {
		// We're sending - change state to "send-it" status!
开发者ID:radicaldesigns,项目名称:amp,代码行数:31,代码来源:send_core.php

示例7: dirname

<?php

require_once dirname(__FILE__) . '/accesscheck.php';
# $Id: export.php,v 1.7.2.1 2007-07-16 19:04:44 basovink Exp $
# export users from PHPlist
include dirname(__FILE__) . '/date.php';
$from = new date("from");
$to = new date("to");
$fromval = $from->getDate("from");
$toval = $to->getDate("to");
if (isset($_POST['column'])) {
    $_POST['column'] = htmlentities($_POST['column']);
}
if (isset($_REQUEST['list'])) {
    if (isset($_GET['list'])) {
        $list = sprintf('%d', $_GET['list']);
    } elseif (isset($_POST['column']) && $_POST['column'] == 'listentered') {
        $list = sprintf('%d', $_POST['list']);
    } else {
        $list = 0;
    }
} else {
    $list = 0;
}
$access = accessLevel('export');
switch ($access) {
    case 'owner':
        $querytables = $GLOBALS['tables']['list'] . ' list ,' . $GLOBALS['tables']['user'] . ' user ,' . $GLOBALS['tables']['listuser'] . ' listuser ';
        $subselect = ' and listuser.listid = list.id and listuser.userid = user.id and list.owner = ' . $_SESSION['logindetails']['id'];
        $listselect_where = ' where owner = ' . $_SESSION['logindetails']['id'];
        $listselect_and = ' and owner = ' . $_SESSION['logindetails']['id'];
开发者ID:atlcurling,项目名称:tkt,代码行数:31,代码来源:export.php

示例8: Error

     ## csrf check
     print Error($GLOBALS['I18N']->get('Invalid security token. Please reload the page and try again.'));
     return;
 }
 if ($_POST['column'] == 'nodate') {
     ## fetch dates as min and max from user table
     if ($list) {
         $dates = Sql_Fetch_Row_Query(sprintf('select min(date(user.modified)),max(date(user.modified)) from %s where listid = %d %s', $querytables, $list, $subselect));
     } else {
         $dates = Sql_Fetch_Row_Query(sprintf('select min(date(user.modified)),max(date(user.modified)) from %s ', $querytables));
     }
     $fromdate = $dates[0];
     $todate = $dates[1];
 } else {
     $fromdate = $from->getDate("from");
     $todate = $to->getDate("to");
 }
 if ($list) {
     $filename = sprintf($GLOBALS['I18N']->get('phpList Export on %s from %s to %s (%s).csv'), ListName($list), $fromdate, $todate, date("Y-M-d"));
 } else {
     $filename = sprintf($GLOBALS['I18N']->get('phpList Export from %s to %s (%s).csv'), $fromdate, $todate, date("Y-M-d"));
 }
 ob_end_clean();
 $filename = trim(strip_tags($filename));
 # header("Content-type: text/plain");
 header("Content-type: " . $GLOBALS["export_mimetype"] . '; charset=UTF-8');
 header("Content-disposition:  attachment; filename=\"{$filename}\"");
 $col_delim = "\t";
 if (EXPORT_EXCEL) {
     $col_delim = ",";
 }
开发者ID:dehvCurtis,项目名称:phplist,代码行数:31,代码来源:export.php

示例9: dbConnect

<html>
    <head>
        <meta charset="UTF-8_general_ci" />
        <link rel="stylesheet" href="myStyle.css" type="text/css" />
    </head>    
    <body>
        <div class="div">
            <h1 id="titlu">Search for the next recyclable trash pick-up date:</h1>
            <form method="post">
                <fieldset class="fieldset">
                    <legend>Please enter today's date!</legend>
                   
                    <label class="label" id="prenume">Data de azi:</label><input class="textfield" id='date' type="date" name="date"/>
                    </br><input class="button" type="submit" name="getDate" value="Get Date" onclick="getDate()" />
                </fieldset>
            </form></br>
			<?php 
include 'dbConnect.php';
include 'date_Class.php';
$connection = new dbConnect();
if (isset($_POST['date'])) {
    $date = $_POST['date'];
    $day = new date();
    $day->getDate($date);
} else {
    echo "Please provide date!";
}
?>
		</div>
	</body>
</html>		
开发者ID:bogdanvt,项目名称:Recyclable_Waste_Collection,代码行数:31,代码来源:getDate.php


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