本文整理汇总了PHP中G::getformatedDate方法的典型用法代码示例。如果您正苦于以下问题:PHP G::getformatedDate方法的具体用法?PHP G::getformatedDate怎么用?PHP G::getformatedDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类G
的用法示例。
在下文中一共展示了G::getformatedDate方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
function index($httpData)
{
global $RBAC;
$RBAC->requirePermissions('PM_LOGIN');
$meta = new stdClass();
$showSystemInfo = $RBAC->userCanAccess('PM_SETUP') == 1;
// setting variables for template
$this->setVar('logo_company', $this->getCompanyLogo());
$this->setVar('userfullname', htmlentities($this->getUserFullName(), ENT_QUOTES, 'UTF-8'));
$this->setVar('user', isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME'] : '');
$this->setVar('pipe', isset($_SESSION['USR_USERNAME']) ? ' | ' : '');
$this->setVar('rolename', $this->getUserRole());
$this->setVar('logout', G::LoadTranslation('ID_LOGOUT'));
$this->setVar('workspace', defined('SYS_SYS') ? ucfirst(SYS_SYS) : '');
$this->setVar('user_avatar', 'users/users_ViewPhotoGrid?pUID=' . $_SESSION['USER_LOGGED'] . '&h=' . rand());
$this->setVar('udate', G::getformatedDate(date('Y-m-d'), 'M d, yyyy', SYS_LANG));
// license notification
$expireInLabel = '';
if (class_exists('pmLicenseManager')) {
$pmLicenseManager =& pmLicenseManager::getSingleton();
$expireIn = $pmLicenseManager->getExpireIn();
$expireInLabel = $pmLicenseManager->getExpireInLabel();
}
$this->setVar('licenseNotification', $expireInLabel);
// setting variables on javascript env.
$this->setJSVar('meta', array('menu' => $this->getMenu()));
$activeTab = 0;
if (isset($_SESSION['_defaultUserLocation'])) {
$activeTab = $this->resolveUrlToTabIndex($_SESSION['_defaultUserLocation']);
}
if (isset($_GET['st'])) {
$activeTab = $this->getActiveTab($_GET['st']);
unset($_GET['st']);
}
$this->setJSVar('activeTab', $activeTab);
$this->setJSVar('urlAddGetParams', $this->getUrlGetParams());
$this->setJSVar('showSystemInfo', $showSystemInfo);
$switchInterface = isset($_SESSION['user_experience']) && $_SESSION['user_experience'] == 'SWITCHABLE';
if (($flyNotify = $this->getFlyNotify()) !== false) {
$this->setJSVar('flyNotify', $flyNotify);
}
$this->setJSVar('switchInterface', $switchInterface);
$this->includeExtJSLib('ux/ux.menu');
$this->includeExtJS('main/index');
$this->setLayout('pm-modern');
$this->afterLoad($httpData);
$this->render();
}
示例2: getAppsData
public function getAppsData($type, $start = null, $limit = null, $user = null, $filter = null, $search = null, $process = null, $status = null, $dateFrom = null, $dateTo = null, $callback = null, $dir = null, $sort = "APP_CACHE_VIEW.APP_NUMBER", $category = null)
{
require_once "classes/model/AppNotes.php";
G::LoadClass('applications');
$apps = new Applications();
$appNotes = new AppNotes();
$start = empty($start) ? $this->appListStart : $start;
$limit = empty($limit) ? $this->appListLimit : $limit;
$notesStart = 0;
$notesLimit = 4;
switch ($user) {
case 'CURRENT_USER':
$user = $this->userID;
break;
case 'ALL':
$user = null;
break;
case null:
$user = $this->userID;
break;
default:
//$user = $this->userID;
break;
}
$cases = $apps->getAll($user, $start, $limit, $type, $filter, $search, $process, $status, $type, $dateFrom, $dateTo, $callback, $dir, $sort, $category);
// formating & complitting apps data with 'Notes'
foreach ($cases['data'] as $i => $row) {
// Formatting
$appTitle = str_replace('#', '', $row['APP_TITLE']);
if (is_numeric($appTitle)) {
$cases['data'][$i]['APP_TITLE'] = G::LoadTranslation('ID_CASE') . ' ' . $appTitle;
}
if (isset($row['DEL_DELEGATE_DATE'])) {
$cases['data'][$i]['DEL_DELEGATE_DATE'] = G::getformatedDate($row['DEL_DELEGATE_DATE'], 'M d, yyyy - h:i:s');
}
if (isset($row['APP_DEL_PREVIOUS_USER'])) {
$cases['data'][$i]['APP_DEL_PREVIOUS_USER'] = ucwords($row['APP_DEL_PREVIOUS_USER']);
}
// Completting with Notes
$notes = $appNotes->getNotesList($row['APP_UID'], '', $notesStart, $notesLimit);
$notes = $notes['array'];
$cases['data'][$i]['NOTES_COUNT'] = $notes['totalCount'];
$cases['data'][$i]['NOTES_LIST'] = $notes['notes'];
}
return $cases;
}
示例3: _default
//.........这里部分代码省略.........
$freeOfChargeText = "";
if (!defined('SKIP_FREE_OF_CHARGE_TEXT')) {
$freeOfChargeText = "Supplied free of charge with no support, certification, warranty, <br>maintenance nor indemnity by Colosa and its Certified Partners.";
}
if (class_exists('pmLicenseManager')) {
$freeOfChargeText = "";
}
$fileFooter = PATH_SKINS . SYS_SKIN . PATH_SEP . 'footer.html';
if (file_exists($fileFooter)) {
$footer .= file_get_contents($fileFooter);
} else {
$fileFooter = PATH_SKIN_ENGINE . SYS_SKIN . PATH_SEP . 'footer.html';
if (file_exists($fileFooter)) {
$footer .= file_get_contents($fileFooter);
} else {
$fileFooter = PATH_CUSTOM_SKINS . SYS_SKIN . PATH_SEP . 'footer.html';
if (file_exists($fileFooter)) {
$footer .= file_get_contents($fileFooter);
} else {
$footer .= "<br />Copyright © 2003-" . date('Y') . " <a href=\"http://www.colosa.com\" alt=\"Colosa, Inc.\" target=\"_blank\">Colosa, Inc.</a> All rights reserved.<br /> {$freeOfChargeText} " . "<br><br/><a href=\"http://www.processmaker.com\" alt=\"Powered by ProcessMaker - Open Source Workflow & Business Process Management (BPM) Management Software\" title=\"Powered by ProcessMaker\" target=\"_blank\"></a>";
}
}
}
}
$oMenu = new Menu();
$menus = $oMenu->generateArrayForTemplate($G_MAIN_MENU, 'SelectedMenu', 'mainMenu', $G_MENU_SELECTED, $G_ID_MENU_SELECTED);
$smarty->assign('menus', $menus);
$oSubMenu = new Menu();
$subMenus = $oSubMenu->generateArrayForTemplate($G_SUB_MENU, 'selectedSubMenu', 'subMenu', $G_SUB_MENU_SELECTED, $G_ID_SUB_MENU_SELECTED);
$smarty->assign('subMenus', $subMenus);
if (!defined('NO_DISPLAY_USERNAME')) {
define('NO_DISPLAY_USERNAME', 0);
}
if (NO_DISPLAY_USERNAME == 0) {
$switch_interface = isset($_SESSION['user_experience']) && $_SESSION['user_experience'] == 'SWITCHABLE';
$smarty->assign('user_logged', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
$smarty->assign('tracker', SYS_COLLECTION == 'tracker' ? $G_PUBLISH->Parts[0]['File'] != 'tracker/login' ? true : '' : '');
$smarty->assign('switch_interface', $switch_interface);
$smarty->assign('switch_interface_label', G::LoadTranslation('ID_SWITCH_INTERFACE'));
$smarty->assign('rolename', isset($_SESSION['USR_ROLENAME']) ? $_SESSION['USR_ROLENAME'] . '' : '');
$smarty->assign('pipe', isset($_SESSION['USR_USERNAME']) ? ' | ' : '');
$smarty->assign('logout', G::LoadTranslation('ID_LOGOUT'));
$smarty->assign('workspace', defined('SYS_SYS') ? SYS_SYS : '');
$uws = isset($_SESSION['USR_ROLENAME']) && $_SESSION['USR_ROLENAME'] != '' ? strtolower(G::LoadTranslation('ID_WORKSPACE_USING')) : G::LoadTranslation('ID_WORKSPACE_USING');
$smarty->assign('workspace_label', $uws);
G::LoadClass("configuration");
$conf = new Configurations();
$conf->getFormats();
if (defined('SYS_SYS')) {
$smarty->assign('udate', $conf->getSystemDate(date('Y-m-d H:i:s')));
} else {
$smarty->assign('udate', G::getformatedDate(date('Y-m-d H:i:s'), 'M d, yyyy', SYS_LANG));
}
$name = $conf->userNameFormat(isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME'] : '', isset($_SESSION['USR_FULLNAME']) ? htmlentities($_SESSION['USR_FULLNAME'], ENT_QUOTES, 'UTF-8') : '', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
$smarty->assign('user', $name);
}
if (class_exists('pmLicenseManager')) {
$pmLicenseManagerO =& pmLicenseManager::getSingleton();
$expireIn = $pmLicenseManagerO->getExpireIn();
$expireInLabel = $pmLicenseManagerO->getExpireInLabel();
//if($expireIn<=30){
if ($expireInLabel != "") {
$smarty->assign('msgVer', '<label class="textBlack">' . $expireInLabel . '</label> ');
}
//}
}
if (defined('SYS_SYS')) {
$logout = '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/login/login';
} else {
$logout = '/sys/' . SYS_LANG . '/' . SYS_SKIN . '/login/login';
}
$smarty->assign('linklogout', $logout);
$smarty->assign('footer', $footer);
$smarty->assign('tpl_menu', PATH_TEMPLATE . 'menu.html');
$smarty->assign('tpl_submenu', PATH_TEMPLATE . 'submenu.html');
G::LoadClass('replacementLogo');
$oLogoR = new replacementLogo();
if (defined("SYS_SYS")) {
$aFotoSelect = $oLogoR->getNameLogo(isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
if (is_array($aFotoSelect)) {
$sFotoSelect = trim($aFotoSelect['DEFAULT_LOGO_NAME']);
$sWspaceSelect = trim($aFotoSelect['WORKSPACE_LOGO_NAME']);
}
}
if (class_exists('PMPluginRegistry')) {
$oPluginRegistry =& PMPluginRegistry::getSingleton();
if (isset($sFotoSelect) && $sFotoSelect != '' && !strcmp($sWspaceSelect, SYS_SYS)) {
$sCompanyLogo = $oPluginRegistry->getCompanyLogo($sFotoSelect);
$sCompanyLogo = "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/setup/showLogoFile.php?id=" . base64_encode($sCompanyLogo);
} else {
$sCompanyLogo = $oPluginRegistry->getCompanyLogo('/images/processmaker.logo.jpg');
}
} else {
$sCompanyLogo = '/images/processmaker.logo.jpg';
}
$smarty->assign('logo_company', $sCompanyLogo);
$smarty->force_compile = $this->forceTemplateCompile;
$smarty->display($this->layoutFile['basename']);
}
}
示例4: isset
}
} else {
$oCase->cancelCase($APP_UID, $DEL_INDEX, $_SESSION['USER_LOGGED']);
}
break;
case 'reactivateCase':
$sApplicationUID = isset($_POST['sApplicationUID']) ? $_POST['sApplicationUID'] : $_SESSION['APPLICATION'];
$iIndex = isset($_POST['sApplicationUID']) ? $_POST['iIndex'] : $_SESSION['INDEX'];
$oCase = new Cases();
$oCase->reactivateCase($sApplicationUID, $iIndex, $_SESSION['USER_LOGGED']);
break;
case 'showPauseCaseInput':
//echo '<input type=button onclick="close_pauseCase()" value="Cancel">';
$aFields = array();
$G_PUBLISH = new Publisher();
$aFields['TIME_STAMP'] = G::getformatedDate(date('Y-m-d'), 'M d, yyyy', SYS_LANG);
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_UnpauseDateInput', '', $aFields);
G::RenderPage('publish', 'raw');
break;
case 'pauseCase':
// Save the note pause reason
if ($_POST['NOTE_REASON'] != '') {
require_once "classes/model/AppNotes.php";
$appNotes = new AppNotes();
$noteContent = addslashes($_POST['NOTE_REASON']);
$result = $appNotes->postNewNote($_POST['APP_UID'], $_SESSION['USER_LOGGED'], $noteContent, $_POST['NOTIFY_PAUSE']);
}
// End save
$unpauseDate = $_POST['unpausedate'] . ' ' . $_REQUEST['unpauseTime'];
$oCase = new Cases();
if (isset($_POST['APP_UID']) && isset($_POST['DEL_INDEX'])) {
示例5: __construct
public function __construct($flagActivatePlugins = true)
{
G::LoadClass('serverConfiguration');
$oServerConf =& serverConf::getSingleton();
$oServerConf->setProperty('LOGIN_NO_WS', true);
//to do: this files probably needs to be in core, since they are GPL2
//include_once (PATH_PLUGINS . 'enterprise' . PATH_SEP . 'classes' . PATH_SEP . 'class.license.lib.php');
//include_once (PATH_PLUGINS . 'enterprise' . PATH_SEP . 'classes' . PATH_SEP . 'class.license.app.php');
require_once PATH_CORE . 'classes' . PATH_SEP . 'class.license.lib.php';
require_once PATH_CORE . 'classes' . PATH_SEP . 'class.license.app.php';
//searching .dat files in workspace folder
$server_array = $_SERVER;
$licfile = glob(PATH_DATA_SITE . "*.dat");
if (count($licfile) > 0 && is_file($licfile[0])) {
$oServerConf->setProperty('ACTIVE_LICENSE', array(SYS_SYS => ""));
}
$activeLicenseSetting = $oServerConf->getProperty('ACTIVE_LICENSE');
if (isset($activeLicenseSetting[SYS_SYS]) && file_exists($activeLicenseSetting[SYS_SYS])) {
$licenseFile = $activeLicenseSetting[SYS_SYS];
} else {
$activeLicense = $this->getActiveLicense();
$oServerConf->setProperty('ACTIVE_LICENSE', array(SYS_SYS => $activeLicense['LICENSE_PATH']));
$licenseFile = $activeLicense['LICENSE_PATH'];
}
$application = new license_application($licenseFile, false, true, false, true);
$application->set_server_vars($server_array);
$application->DATE_STRING = 'Y-m-d H:i:s';
$results = $application->validate();
$validStatus = array('OK', 'EXPIRED', 'TMINUS');
$this->result = $results['RESULT'];
$this->features = array();
$this->licensedfeatures = array();
$this->licensedfeaturesList = array();
if (in_array($this->result, $validStatus)) {
$this->serial = "3ptta7Xko2prrptrZnSd356aqmPXvMrayNPFj6CLdaR1pWtrW6qPw9jV0OHjxrDGu8LVxtmSm9nP5kR23HRpdZWccpeui+bKkK°DoqCt2Kqgpq6Vg37s";
$info['FIRST_NAME'] = $results['DATA']['FIRST_NAME'];
$info['LAST_NAME'] = $results['DATA']['LAST_NAME'];
$info['DOMAIN_WORKSPACE'] = $results['DATA']['DOMAIN_WORKSPACE'];
$this->date = $results['DATE'];
$this->info = $info;
$this->type = $results['DATA']['TYPE'];
$this->plan = isset($results['DATA']['PLAN']) ? $results['DATA']['PLAN'] : "";
$this->id = $results['ID'];
$this->expireIn = $this->getExpireIn();
$this->features = $this->result != 'TMINUS' ? isset($results['DATA']['CUSTOMER_PLUGIN']) ? $results['DATA']['CUSTOMER_PLUGIN'] : $this->getActiveFeatures() : array();
$this->licensedfeatures = $this->result != 'TMINUS' ? isset($results['DATA']['CUSTOMER_LICENSED_FEATURES']) ? $results['DATA']['CUSTOMER_LICENSED_FEATURES'] : array() : array();
$this->licensedfeaturesList = isset($results['DATA']['LICENSED_FEATURES_LIST']) ? $results['DATA']['LICENSED_FEATURES_LIST'] : null;
$this->status = $this->getCurrentLicenseStatus();
if (isset($results['LIC'])) {
$resultsRegister = $results['LIC'];
$this->server = $results['LIC']['SRV'];
$this->file = $results['LIC']['FILE'];
$this->workspace = isset($results['LIC']['WORKSPACE']) ? $results['LIC']['WORKSPACE'] : 'pmLicenseSrv';
$this->licenseSerial = isset($results['LIC']['SERIAL']) ? $results['LIC']['SERIAL'] : '';
$this->supportStartDate = isset($results['DATA']['SUPPORT_START_DATE']) ? $results['DATA']['SUPPORT_START_DATE'] : '';
$this->supportEndDate = isset($results['DATA']['SUPPORT_END_DATE']) ? $results['DATA']['SUPPORT_END_DATE'] : '';
$this->supportStartDate = date("Y-m-d H:i:s", strtotime($this->supportStartDate));
$this->supportEndDate = date("Y-m-d H:i:s", strtotime($this->supportEndDate));
G::LoadClass("configuration");
$conf = new Configurations();
if (defined('SYS_SYS') && $conf->exists("ENVIRONMENT_SETTINGS")) {
$this->supportStartDate = $conf->getSystemDate($this->supportStartDate);
$this->supportEndDate = $conf->getSystemDate($this->supportEndDate);
} else {
$this->supportStartDate = G::getformatedDate($this->supportStartDate, 'M d, yyyy', SYS_LANG);
$this->supportEndDate = G::getformatedDate($this->supportEndDate, 'M d, yyyy', SYS_LANG);
}
} else {
$resultsRegister = array();
$resultsRegister['ID'] = $results['DATA']['DOMAIN_WORKSPACE'];
$this->server = null;
$this->file = null;
}
$resultsRegister['date'] = $results['DATE'];
$resultsRegister['info'] = $info;
$resultsRegister['type'] = $results['DATA']['TYPE'];
if ($oServerConf->getProperty('LICENSE_INFO')) {
$licInfoA = $oServerConf->getProperty('LICENSE_INFO');
} else {
$licInfoA = array();
}
$licInfoA[SYS_SYS] = $resultsRegister;
$oServerConf->setProperty('LICENSE_INFO', $licInfoA);
}
if ($flagActivatePlugins) {
$this->activateFeatures();
}
}
示例6: literalDate
/**
*
* @method
*
* Returns a specified date written out in a given language, with full month names.
*
* @name literalDate
* @label Literal Date
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#literalDate.28.29
*
* @param string(32) | $date | date | The input date in standard format (yyyy-mm-dd) that is a string.
* @param string(32) | $lang="en" | Language | The language to display, which can be 'en' (English) or 'es' (Spanish). If not included, then it will be English by default.
* @return string | $literaDate | Literal date | It returns the literal date as a string value.
*
*/
function literalDate($date, $lang = 'en')
{
if (!isset($date) or $date == '') {
throw new Exception('function:formatDate::Bad param');
}
try {
switch ($lang) {
case 'en':
$ret = G::getformatedDate($date, 'M d,yyyy', $lang);
break;
case 'es':
$ret = G::getformatedDate($date, 'd de M de yyyy', $lang);
break;
}
return $ret;
} catch (Exception $oException) {
throw $oException;
}
}
示例7: getAppsData
public function getAppsData($type, $start = null, $limit = null)
{
require_once "classes/model/AppNotes.php";
G::LoadClass('applications');
$apps = new Applications();
$appNotes = new AppNotes();
$start = empty($start) ? $this->appListStart : $start;
$limit = empty($limit) ? $this->appListLimit : $limit;
$notesStart = 0;
$notesLimit = 4;
$cases = $apps->getAll($this->userID, $start, $limit, $type);
//g::pr($cases['data']); die;
// formating & complitting apps data with 'Notes'
foreach ($cases['data'] as $i => $row) {
// Formatting
$appTitle = str_replace('#', '', $row['APP_TITLE']);
if (is_numeric($appTitle)) {
$cases['data'][$i]['APP_TITLE'] = G::LoadTranslation('ID_CASE') . ' ' . $appTitle;
}
if (isset($row['DEL_DELEGATE_DATE'])) {
$cases['data'][$i]['DEL_DELEGATE_DATE'] = G::getformatedDate($row['DEL_DELEGATE_DATE'], 'M d, yyyy - h:i:s');
}
if (isset($row['APP_DEL_PREVIOUS_USER'])) {
$cases['data'][$i]['APP_DEL_PREVIOUS_USER'] = ucwords($row['APP_DEL_PREVIOUS_USER']);
}
// Completting with Notes
$notes = $appNotes->getNotesList($row['APP_UID'], '', $notesStart, $notesLimit);
$notes = $notes['array'];
$cases['data'][$i]['NOTES_COUNT'] = $notes['totalCount'];
$cases['data'][$i]['NOTES_LIST'] = $notes['notes'];
}
return $cases;
}
示例8: Configurations
AddonsStore::checkLicenseStore();
$licenseManager =& pmLicenseManager::getSingleton();
$oHeadPublisher =& headPublisher::getSingleton();
if (isset($licenseManager->date) && is_array($licenseManager->date)) {
G::LoadClass("configuration");
$conf = new Configurations();
if (defined('SYS_SYS') && $conf->exists("ENVIRONMENT_SETTINGS")) {
$licenseManager->date['START'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['START']));
$licenseManager->date['END'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['END']));
$licenseManager->date['START'] = $conf->getSystemDate($licenseManager->date['START']);
$licenseManager->date['END'] = $conf->getSystemDate($licenseManager->date['END']);
} else {
$licenseManager->date['START'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['START']));
$licenseManager->date['END'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['END']));
$licenseManager->date['START'] = G::getformatedDate($licenseManager->date['START'], 'M d, yyyy', SYS_LANG);
$licenseManager->date['END'] = G::getformatedDate($licenseManager->date['END'], 'M d, yyyy', SYS_LANG);
}
}
if (isset($licenseManager->result) && $licenseManager->result == "OK") {
$oHeadPublisher->assign("license_start_date", $licenseManager->date["START"]);
$oHeadPublisher->assign("license_end_date", $licenseManager->expireIn != "NEVER" ? $licenseManager->date["END"] : "NA");
$oHeadPublisher->assign("license_user", $licenseManager->info["FIRST_NAME"] . " " . $licenseManager->info["LAST_NAME"] . " (" . $licenseManager->info["DOMAIN_WORKSPACE"] . ")");
$oHeadPublisher->assign("license_span", $licenseManager->expireIn != "NEVER" ? ceil($licenseManager->date["SPAN"] / 60 / 60 / 24) : "~");
$oHeadPublisher->assign("license_name", $licenseManager->type);
$oHeadPublisher->assign("license_server", $licenseManager->server);
$oHeadPublisher->assign("license_expires", $licenseManager->expireIn);
$oHeadPublisher->assign("license_message", $licenseManager->status["message"]);
$oHeadPublisher->assign("licensed", true);
} elseif (isset($licenseManager->info)) {
$oHeadPublisher->assign("license_start_date", $licenseManager->date["START"]);
$oHeadPublisher->assign("license_end_date", $licenseManager->date["END"]);