本文整理汇总了PHP中isPost函数的典型用法代码示例。如果您正苦于以下问题:PHP isPost函数的具体用法?PHP isPost怎么用?PHP isPost使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isPost函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: index
public function index($nidtype = 'news', $nid = '')
{
if (isPost()) {
extract($_POST);
}
if (isGet()) {
extract($_GET);
}
/* -----------------------------------------------------
* Talbe Field
* -----------------------------------------------------
*/
$param['data'] = array('nidtype' => $nidtype, 'nid' => $nid);
/* -----------------------------------------------------
* Page Param
* -----------------------------------------------------
*/
$param['page'] = isset($page) ? $page : 1;
$param['page_size'] = 3;
//每页显示条数
$param['show_page'] = 5;
//页面banner能显示页数
$param['uri'] = 'news?page=';
$datalist = $this->cinode->select($param);
$this->put("list", $datalist['data']);
debug($datalist['data'], DEBUGPATH, 'news datalist');
$this->put("pagerbar", $datalist['pagebanner']);
$this->render('news_list.html');
}
开发者ID:johnlion,项目名称:srcms,代码行数:29,代码来源:news.php
示例2: index
/**
* [index 产品列表]
* uri domain/nidtype/nid/page
* @param string $nidtype [description]
* @param integer $page [description]
* @param string $nid [description]
* @return [type] [description]
*/
public function index($nidtype = 'article', $nid = '')
{
if (isPost()) {
extract($_POST);
}
if (isGet()) {
extract($_GET);
}
/* -----------------------------------------------------
* Talbe Field
* -----------------------------------------------------
*/
$param['data'] = array('nidtype' => $nidtype, 'nid' => $nid);
/* -----------------------------------------------------
* Page Param
* -----------------------------------------------------
*/
$param['page'] = isset($page) ? $page : 1;
$param['page_size'] = 1;
//当前页数
$param['show_page'] = 5;
//页面banner能显示页数
$datalist = $this->cinode->select($param);
$this->cismarty->assign("datalist", $datalist['data']);
$this->cismarty->assign("pages", $datalist['pagebanner']);
//传入菜单按钮active状态
$this->cismarty->assign("active", array(__CLASS__, __FUNCTION__));
$title = t("article_list");
$this->cismarty->assign("title", $title);
$this->cismarty->display("nodearticle/nodearticle_index.html");
}
开发者ID:johnlion,项目名称:hlsc,代码行数:39,代码来源:AdminNodeArticle.php
示例3: EventIndex
protected function EventIndex()
{
/**
* Обработка удаления плагинов
*/
if (isPost('submit_plugins_del')) {
$this->Security_ValidateSendForm();
$aPluginsDelete = getRequest('plugins_del');
if (is_array($aPluginsDelete)) {
$this->Plugin_Delete(array_keys($aPluginsDelete));
}
}
if ($sPlugin = getRequest('plugin', null, 'get') and $sAction = getRequest('action', null, 'get')) {
return $this->SubmitManagePlugin($sPlugin, $sAction);
}
/**
* Передан ли номер страницы
*/
$iPage = preg_match("/^\\d+\$/i", $this->GetEventMatch(2)) ? $this->GetEventMatch(2) : 1;
/**
* Получаем список блогов
*/
$aPlugins = $this->Plugin_GetList();
/**
* Загружаем переменные в шаблон
*/
$this->Viewer_Assign("aPlugins", $aPlugins);
$this->Viewer_AddHtmlTitle($this->Lang_Get('plugins_administartion_title'));
/**
* Устанавливаем шаблон вывода
*/
$this->SetTemplateAction('index');
}
开发者ID:lifecom,项目名称:test,代码行数:33,代码来源:ActionPlugins.class.php
示例4: _EventPluginsList
protected function _EventPluginsList()
{
// * Обработка удаления плагинов
if (isPost('submit_plugins_del')) {
$this->EventPluginsDelete();
} elseif (isPost('submit_plugins_save')) {
$this->EventPluginsSave();
} else {
if ($sPlugin = getRequest('plugin', null, 'get') and $sAction = getRequest('action', null, 'get')) {
if ($sAction == 'deactivate') {
return $this->_SubmitManagePlugin($sPlugin, $sAction);
} else {
return $this->EventPluginsActivate($sPlugin);
}
}
}
$sMode = $this->GetParam(1);
if (!$sMode) {
$sMode == 'all';
}
$aPlugins = $this->PluginAceadminpanel_Plugin_GetPluginList();
if ($sMode != 'all') {
foreach ($aPlugins as $sPlugin => $oPlugin) {
if ($sMode == 'active' and !$oPlugin->IsActive() or $sMode == 'inactive' and $oPlugin->IsActive()) {
unset($aPlugins[$sPlugin]);
}
}
}
$this->Viewer_Assign('aPluginList', $aPlugins);
$this->Viewer_AddHtmlTitle($this->Lang_Get('plugins_administartion_title'));
$this->Viewer_Assign('sMode', $sMode);
$this->SetTemplateAction('plugins_list');
}
开发者ID:lunavod,项目名称:bunker_stable,代码行数:33,代码来源:ActionAdmin_EventPlugins.class.php
示例5: showMain
/** {@inheritdoc} */
public function showMain()
{
if (!is_writable($this->app['configPath'])) {
$this->addMessage("Configuration file doesn't seem to be writable.", self::MSG_ERROR);
}
$config = $this->app->openConfiguration();
$pages = PagePeer::getSelect();
$form = new Curry_Form(array('action' => url('', array("module", "view")), 'method' => 'post', 'elements' => array('enabled' => array('checkbox', array('label' => 'Enable domain mapping', 'value' => $config->domainMapping->enabled)), 'default_base_page' => array('select', array('label' => 'Default base page', 'description' => 'The default base page will only be used if there are no other domains matching and domain mapping is enabled', 'value' => $config->domainMapping->default, 'multiOptions' => array('' => '[ None ]') + $pages)))));
$domainForm = new Curry_Form_Dynamic(array('legend' => 'Domain', 'elements' => array('domain' => array('text', array('label' => 'Domain', 'description' => 'You can use default as a wildcard to fetch unmatched domains.', 'required' => true)), 'base_page' => array('select', array('label' => 'Base page', 'multiOptions' => array('' => '[ None ]') + $pages, 'required' => true)), 'include_www' => array('checkbox', array('label' => 'Include www')))));
$form->addSubForm(new Curry_Form_MultiForm(array('legend' => '', 'cloneTarget' => $domainForm, 'defaults' => $config->domainMapping->domains ? $config->domainMapping->domains->toArray() : array())), 'domainMapping');
$form->addElement('submit', 'save', array('label' => 'Save'));
if (isPost() && $form->isValid($_POST)) {
$values = $form->getValues();
if (!$config->domainMapping) {
$config->domainMapping = array();
}
$config->domainMapping->enabled = count($values['domainMapping']) ? (bool) $values['enabled'] : false;
$config->domainMapping->default = $values['default_base_page'];
$config->domainMapping->domains = $values['domainMapping'];
try {
$this->app->writeConfiguration($config);
$this->addMessage("Settings saved.", self::MSG_SUCCESS);
} catch (Exception $e) {
$this->addMessage($e->getMessage(), self::MSG_ERROR);
}
}
$this->addMainContent($form);
}
开发者ID:bombayworks,项目名称:currycms,代码行数:29,代码来源:DomainMapping.php
示例6: Event
public function Event()
{
if (isPost('adm_submit')) {
$this->Security_ValidateSendForm();
$this->ClearComments();
}
}
开发者ID:lifecom,项目名称:Huddlebuddle,代码行数:7,代码来源:ActionAdminToolsComments.class.php
示例7: generalAction
public function generalAction()
{
$model = new SettingsModel();
if (isPost()) {
$data['realname'] = post('realname');
$data['country'] = post('country');
$data['city'] = post('city');
$data['sex'] = post('sex', 'int');
$data['mm'] = post('mm', 'int');
$data['dd'] = post('dd', 'int');
$data['yyyy'] = post('yyyy', 'int');
$data['about'] = post('about');
$tradelink = urldecode(post('tradelink'));
if (preg_match('/' . preg_quote('/?partner=', '/') . '(.*)' . preg_quote('&token=', '/') . '/Us', $tradelink, $match)) {
$partner = $match[1];
}
if (preg_match('/' . preg_quote('&token=', '/') . '(.*)' . preg_quote('<<<eof', '/') . '/Us', $tradelink . '<<<eof', $match)) {
$token = $match[1];
}
if ($partner && $token) {
$data['partner'] = $partner;
$data['token'] = $token;
}
$model->setSettings(Request::getParam('user')->id, $data);
$path = 'public/users/' . Request::getParam('user')->id . '/';
remkdir($path);
File::LoadImage($_FILES['file'], $path, 'avatar', 'jpg', null, 0, 2, 184, 184);
File::LoadImage($_FILES['file'], $path, 'avatar_m', 'jpg', null, 0, 2, 64, 64);
File::LoadImage($_FILES['file'], $path, 'avatar_s', 'jpg', null, 0, 2, 32, 32);
redirect(url('settings', 'general'));
}
$this->view->countrysList = $model->getCountryList();
$this->view->title = Lang::translate('GENERAL_TITLE');
}
开发者ID:terrasystems,项目名称:csgobattlecom,代码行数:34,代码来源:Controller.php
示例8: EventReport
protected function EventReport()
{
/**
* Обработка удаления отчетов профайлера
*/
if (isPost('submit_report_delete')) {
$this->Security_ValidateSendForm();
$aReportsId = getRequest('report_del');
if (is_array($aReportsId)) {
if ($this->PluginProfiler_Profiler_DeleteEntryByRequestId(array_keys($aReportsId))) {
$this->Message_AddNotice($this->Lang_Get('plugin.profiler.report_delete_success'), $this->Lang_Get('attention'));
} else {
$this->Message_AddError($this->Lang_Get('plugin.profiler.report_delete_error'), $this->Lang_Get('error'));
}
}
}
/**
* Если вызвана обработка upload`а логов в базу данных
*/
if (getRequest('submit_profiler_import') and getRequest('profiler_date_import')) {
$iCount = @$this->PluginProfiler_Profiler_UploadLog(date('Y-m-d H:i:s', strtotime(getRequest('profiler_date_import'))));
if (!is_null($iCount)) {
$this->Message_AddNotice($this->Lang_Get('plugin.profiler.import_report_success', array('count' => $iCount)), $this->Lang_Get('attention'));
} else {
$this->Message_AddError($this->Lang_Get('plugin.profiler.import_report_error'), $this->Lang_Get('error'));
}
}
/**
* Составляем фильтр для просмотра отчетов
*/
$aFilter = $this->BuildFilter();
/**
* Передан ли номер страницы
*/
$iPage = preg_match("/^page(\\d+)\$/i", $this->getParam(0), $aMatch) ? $aMatch[1] : 1;
/**
* Получаем список отчетов
*/
$aResult = $this->PluginProfiler_Profiler_GetReportsByFilter($aFilter, $iPage, Config::Get('plugin.profiler.per_page'));
$aReports = $aResult['collection'];
/**
* Если был использован фильтр, выводим количество найденых по фильтру
*/
if (count($aFilter)) {
$this->Message_AddNotice($aResult['count'] ? $this->Lang_Get('plugin.profiler.filter_result_count', array('count' => $aResult['count'])) : $this->Lang_Get('plugin.profiler.filter_result_empty'));
}
/**
* Формируем постраничность
*/
$aPaging = $this->Viewer_MakePaging($aResult['count'], $iPage, Config::Get('plugin.profiler.per_page'), Config::Get('pagination.pages.count'), Router::GetPath('profiler') . $this->sCurrentEvent, array_intersect_key($_REQUEST, array_fill_keys(array('start', 'end', 'request_id', 'time', 'per_page'), '')));
/**
* Загружаем переменные в шаблон
*/
$this->Viewer_Assign('aPaging', $aPaging);
$this->Viewer_Assign('aReports', $aReports);
$this->Viewer_Assign('aDatabaseStat', ($aData = $this->PluginProfiler_Profiler_GetDatabaseStat()) ? $aData : array('max_date' => '', 'count' => ''));
$this->Viewer_AddBlock('right', 'actions/ActionProfiler/sidebar.tpl', array('plugin' => 'profiler'));
$this->Viewer_AddHtmlTitle($this->Lang_Get('plugin.profiler.report_page_title'));
}
开发者ID:cbrspc,项目名称:LIVESTREET-1-DISTRIB,代码行数:59,代码来源:ActionProfiler.class.php
示例9: edit
public function edit()
{
if (isPost()) {
return $this->_edit();
}
$row = m('Category')->getRowById(get('id'));
$this->view()->assign('title', '编辑分类')->assign('action', url('Category', 'edit'))->assign('row', $row)->display('category_form');
}
开发者ID:frycnx,项目名称:jxc,代码行数:8,代码来源:Category.php
示例10: edit
public function edit()
{
if (isPost()) {
return $this->_edit();
}
$row = m('Staff')->getRowById(get('id'));
$this->view()->assign('title', '编辑员工')->assign('action', url('Staff', 'edit'))->assign('row', $row)->assign('my_shop', getMyShop())->display('staff_form');
}
开发者ID:frycnx,项目名称:jxc,代码行数:8,代码来源:Staff.php
示例11: profile
public function profile()
{
if (isPost()) {
return $this->_profile();
}
$row = m('User')->getRowById($_SESSION['user_id']);
$this->view()->assign('row', $row);
$this->view()->display();
}
开发者ID:frycnx,项目名称:jxc,代码行数:9,代码来源:Index.php
示例12: index
public function index()
{
if (isPost()) {
extract($_POST);
}
if (isGet()) {
extract($_GET);
}
print_r($this->cirbac->index());
}
开发者ID:johnlion,项目名称:hlsc,代码行数:10,代码来源:CRbac.php
示例13: EventIndex
protected function EventIndex()
{
if (isPost('submit_book_save')) {
$this->Security_ValidateSendForm();
$post = $GLOBALS['_POST'];
if ($post['theme']) {
$this->Message_AddNotice($post['theme'], 'Выбрана тема');
}
}
}
开发者ID:lunavod,项目名称:bunker_stable,代码行数:10,代码来源:ActionTheme.class.php
示例14: EventMHB
public function EventMHB()
{
$aBlogs = $this->Blog_GetBlogs();
if (isPost('submit_mhb')) {
$this->Security_ValidateSendForm();
$this->PluginMHB_ModuleMain_DeleteAllMhb();
foreach ($_REQUEST as $key => $var) {
$oMhb = null;
if (strpos($key, 'mhb_auto_join_') === 0) {
$iBlogId = substr($key, 14);
$oMhb = $this->PluginMHB_ModuleMain_GetMhbByBlogId($iBlogId);
if (!$oMhb) {
$oMhb = Engine::GetEntity('PluginMHB_Main_Mhb');
$oMhb->setBlogId($iBlogId);
$oMhb->setAutoJoin(1);
$oMhb->setCantLeave(0);
$this->PluginMHB_ModuleMain_AddMhb($oMhb);
} else {
$oMhb->setAutoJoin(1);
$this->PluginMHB_ModuleMain_UpdateMhb($oMhb);
}
}
if (strpos($key, 'mhb_cant_leave_') === 0) {
$iBlogId = substr($key, 15);
$oMhb = $this->PluginMHB_ModuleMain_GetMhbByBlogId($iBlogId);
if (!$oMhb) {
$oMhb = Engine::GetEntity('PluginMHB_Main_Mhb');
$oMhb->setBlogId($iBlogId);
$oMhb->setAutoJoin(0);
$oMhb->setCantLeave(1);
$this->PluginMHB_ModuleMain_AddMhb($oMhb);
} else {
$oMhb->setCantLeave(1);
$this->PluginMHB_ModuleMain_UpdateMhb($oMhb);
}
}
}
}
$aMhb = $this->PluginMHB_ModuleMain_GetAllMhb();
$aData = array();
foreach ($aBlogs as $oBlog) {
$data['blog_id'] = $oBlog->getId();
$data['title'] = $oBlog->getTitle();
$data['closed'] = $oBlog->getType() == 'close';
$data['auto_join'] = false;
$data['cant_leave'] = false;
if (isset($aMhb[$oBlog->getId()])) {
$data['auto_join'] = $aMhb[$oBlog->getId()]->getAutoJoin();
$data['cant_leave'] = $aMhb[$oBlog->getId()]->getCantLeave();
}
$aData[] = $data;
}
$this->Viewer_AddBlock('right', 'block.info.tpl', array('plugin' => 'mhb'), 100);
$this->Viewer_Assign("aData", $aData);
}
开发者ID:lunavod,项目名称:bunker_stable,代码行数:55,代码来源:ActionAdmin.class.php
示例15: remove
function remove()
{
$ret = 0;
if (isPost() && post('file')) {
$file = $this->temp_imgDir . post('file');
if (file_exists($file)) {
$ret = unlink($file);
}
}
echo $ret;
}
开发者ID:cyberorca,项目名称:dfp-api,代码行数:11,代码来源:uploader.php
示例16: index
public function index()
{
if (isPost()) {
return $this->_index();
}
$arr = m('Option')->getList();
$opt = array();
foreach ($arr as $val) {
$opt[$val['key']] = $val['val'];
}
$this->view()->assign('title', '其他设置')->assign('opt', $opt)->display('option_form');
}
开发者ID:frycnx,项目名称:jxc,代码行数:12,代码来源:Option.php
示例17: param
function param($name, $default = '', $trim = true)
{
$p = queryParams();
if (!isset($p[$name])) {
if (isPost()) {
$p = $_POST;
} else {
return $default;
}
}
return isset($p[$name]) ? $trim ? trim($p[$name]) : $p[name] : $default;
}
开发者ID:broofa,项目名称:socipedia,代码行数:12,代码来源:util_helper.php
示例18: index
public function index($nidtype = 'taxonomy', $nid = '')
{
if (isPost()) {
extract($_POST);
}
if (isGet()) {
extract($_GET);
}
$datalist['data'] = $this->citaxonomy->leaf(0);
$this->put("list", $datalist['data']);
$this->render('taxo_list.html');
}
开发者ID:johnlion,项目名称:srcms,代码行数:12,代码来源:taxo.php
示例19: showSettings
public function showSettings()
{
$form = $this->getSettingsForm();
if (isPost() && $form->isValid($_POST)) {
$values = $form->getValues(true);
$this->saveSettings($values);
$this->addMessage('Settings saved', self::MSG_SUCCESS);
return;
}
$this->addMainContent($form);
$this->addMessage('You can also execute project cron tasks from this url: ' . url(Curry_Core::$config->curry->baseUrl . 'CurryCron.php/', array('hash' => self::getCronExecutionHash()))->getAbsolute());
}
开发者ID:josedsilva,项目名称:curry-backend-currycron,代码行数:12,代码来源:CronJobScheduler.php
示例20: runOnPostWithAllRequiredParametersWithErrorReroute
function runOnPostWithAllRequiredParametersWithErrorReroute($functionToRun, $listOfRequiredPostParameters = [])
{
global $serverPath;
require_once $serverPath . "utils/redirectUtilities.php";
if (isPost()) {
$missingPostParameters = findMissingPostParameters($listOfRequiredPostParameters);
if (count($missingPostParameters) == 0) {
$functionToRun();
} else {
displayErrorNotAllRequiredDataPresentInPost($missingPostParameters);
}
}
}
开发者ID:Cassioblu55,项目名称:linger,代码行数:13,代码来源:postUtilities.php
注:本文中的isPost函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论