本文整理匯總了PHP中UserData::setCurrentTimestamp方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserData::setCurrentTimestamp方法的具體用法?PHP UserData::setCurrentTimestamp怎麽用?PHP UserData::setCurrentTimestamp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserData
的用法示例。
在下文中一共展示了UserData::setCurrentTimestamp方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Frontend
* Window: formular for user
* @package Runalyze\Plugins\Panels
*/
require '../../inc/class.Frontend.php';
$Frontend = new Frontend();
if (Request::param('delete') == 'true') {
DB::getInstance()->deleteByID('user', (int) Request::sendId());
Cache::delete(UserData::CACHE_KEY);
header('Location: window.sportler.table.php?reload=true');
exit;
}
if (Request::sendId() === false) {
$Header = __('Add body values');
$Mode = StandardFormular::$SUBMIT_MODE_CREATE;
$UserData = new UserData(DataObject::$LAST_OBJECT);
$UserData->setCurrentTimestamp();
} else {
$Header = __('Edit body values');
$Mode = StandardFormular::$SUBMIT_MODE_EDIT;
$UserData = new UserData(Request::sendId());
}
$Formular = new StandardFormular($UserData, $Mode);
if ($Formular->submitSucceeded()) {
header('Location: window.sportler.table.php?reload=true');
exit;
}
$Factory = new PluginFactory();
$Plugin = $Factory->newInstance('RunalyzePluginPanel_Sportler');
echo '<div class="panel-heading">';
echo '<div class="panel-menu"><ul><li>' . $Plugin->tableLink() . '</li></ul></div>';
echo '<h1>' . $Header . '</h1>';