本文整理汇总了PHP中Output::App方法的典型用法代码示例。如果您正苦于以下问题:PHP Output::App方法的具体用法?PHP Output::App怎么用?PHP Output::App使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Output
的用法示例。
在下文中一共展示了Output::App方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
function save()
{
//echoPre($_POST);die;
if ($_POST) {
$dt = array('popup_id' => post('popup_id') != '' ? post('popup_id') : '', 'popup_schedule_start' => post('popup_schedule_start') != '' ? trim(post('popup_schedule_start')) : '', 'popup_schedule_end' => post('popup_schedule_end') != '' ? trim(post('popup_schedule_end')) : '', 'popup_wording' => post('popup_wording') != '' ? strip_tags(post('popup_wording')) : '', 'popup_status' => post('popup_status') != '' ? trim(post('popup_status')) : '', 'popup_url' => post('popup_url') != '' ? trim(post('popup_url')) : '');
$modeUpdate = false;
if ($dt['popup_id'] == '') {
//insert quote
unset($dt['popup_id']);
$popup_id = $this->popup_model->insert_data($dt);
} else {
//update quote
$modeUpdate = true;
$popup_id = $this->popup_model->update_data($dt, $dt['popup_id']);
$popup_id = $dt['popup_id'];
$server_cluster = $this->config['server_cluster'];
foreach ($server_cluster as $serv) {
$json = file_get_contents($serv . 'update-json/popup');
//echo $serv . 'update-json/popup';
//echoPre($json);
}
}
$dt['popup_url'] = $dt['popup_url'] != '' ? $dt['popup_url'] : url_title($popup_id . ' ' . $dt['popup_wording']);
$this->_prosesImageQuote($dt, $popup_id);
Output::App()->redirect($this->config['base_url'] . $this->ctrler . '/&s=success');
} else {
Output::App()->redirect($this->config['base_url'] . $this->ctrler . '/&s=failed');
exit;
}
}
示例2: pre_routes
function pre_routes(&$uri = array(), &$old_uri = "")
{
//echo $uri . ' - ' . $old_uri;
if ($uri != "/" && strpos($uri, "userlogin") === false) {
if (!isset($_SESSION['usr_id'])) {
$CTR =& load_object('Config');
Output::App()->redirect($CTR->get('base_url'));
}
}
}
示例3: changeStatus
public function changeStatus()
{
if ($this->uri->get('id')) {
if ($this->uri->get('sts') == '1') {
$dt['rubrics_invalid'] = '0';
} else {
$dt['rubrics_invalid'] = '1';
}
$this->rubrics_model->saveColumnRecord($dt, array('rubrics_id' => $this->uri->get('id')));
}
Output::App()->redirect($this->config['base_url'] . 'column/');
}
示例4: save
function save()
{
if ($_POST) {
$dt = array('id' => post('id') != '' ? post('id') : '', 'title' => post('title') != '' ? trim(post('title')) : '', 'tag' => post('tag') != '' ? trim(post('tag')) : '', 'category' => post('category') != '' ? json_encode(array(post('category'))) : '', 'status' => post('status') != '' ? trim(post('status')) : '', 'order' => post('order') != '' ? trim(post('order')) : '');
$modeUpdate = false;
if ($dt['id'] == '') {
unset($dt['id']);
//echoPre($dt);exit;
$id = $this->today_tag_model->insert_data($dt);
} else {
$modeUpdate = true;
$dt['`order`'] = $dt['order'];
unset($dt['order']);
$id = $this->today_tag_model->update_data($dt, $dt['id']);
$id = $dt['id'];
}
Output::App()->redirect($this->config['base_url'] . $this->ctrler . '/&s=success');
} else {
Output::App()->redirect($this->config['base_url'] . $this->ctrler . '/&s=failed');
exit;
}
}
示例5: save
function save()
{
if ($_POST) {
$dt = array('quote_id' => post('quote_id') != '' ? post('quote_id') : '', 'quote_schedule' => post('quote_schedule') != '' ? trim(post('quote_schedule')) : '', 'quote_figure' => post('quote_figure') != '' ? post('quote_figure') : '', 'quote_content' => post('quote_content') != '' ? strip_tags(post('quote_content')) : '', 'quote_news' => post('quote_news') != '' ? trim(post('quote_news')) : '', 'quote_status' => post('quote_status') != '' ? trim(post('quote_status')) : '', 'quote_url' => post('quote_url') != '' ? trim(post('quote_url')) : '', 'quote_image' => post('quote_image') != '' ? trim(post('quote_image')) : '');
$modeUpdate = false;
if ($dt['quote_id'] == '') {
//insert quote
unset($dt['quote_id']);
$quote_id = $this->quote_model->insert_data($dt);
} else {
//update quote
$modeUpdate = true;
$quote_id = $this->quote_model->update_data($dt, $dt['quote_id']);
$quote_id = $dt['quote_id'];
}
$dt['quote_url'] = $dt['quote_url'] != '' ? $dt['quote_url'] : url_title($quote_id . ' ' . $dt['quote_figure']);
$this->_prosesImageQuote($dt, $quote_id);
Output::App()->redirect($this->config['base_url'] . $this->ctrler . '/');
} else {
Output::App()->redirect($this->config['base_url'] . $this->ctrler . '/');
exit;
}
}
示例6: preview
function preview()
{
$id = $this->uri->get('id');
if (isset($id)) {
$ret = $arr = $this->_get_edit_news($id);
$dt = array('prefix_title' => 'News Preview', 'title' => 'News Preview', 'top_active' => $this->method_by_url[$this->ctrler]['parent_id'], 'sub_menu' => $this->method_by_url[$this->ctrler]['sub_id'], 'content' => $this->provideNewsPreview($ret), 'custom_css' => array($this->config['assets_css_url'] . 'dropzone.css', $this->config['assets_css_url'] . 'news/n_news.css'), 'custom_js' => array($this->config['assets_js_url'] . 'news/n_news.js'));
} else {
Output::App()->redirect($this->config['base_url'] . $this->ctrler . '/');
exit;
}
$this->render('url/_templates', $dt);
}
示例7: save
function save()
{
// echoPre($_POST);
// die;
$data = $_POST;
$date = $this->uri->get('date');
$dt = array();
if (isset($data["event_title"]) && is_array($data["event_title"])) {
#$date = $this->uri->get('date');
foreach ($data["event_title"] as $i => $fig) {
if (trim($fig) != '') {
$dt[$i]['event_title'] = trim($fig);
}
}
if (isset($data["event_url"]) && is_array($data["event_url"])) {
foreach ($data["event_url"] as $ii => $quote) {
if (trim($quote) != '') {
$dt[$ii]['event_url'] = trim($quote);
}
}
}
if (isset($data["event_id"]) && is_array($data["event_id"])) {
foreach ($data["event_id"] as $iii => $quote) {
if (trim($quote) != '') {
$dt[$iii]['event_id'] = trim($quote);
}
}
}
if (isset($data["event_description"]) && is_array($data["event_description"])) {
foreach ($data["event_description"] as $iiii => $quote) {
if (trim($quote) != '') {
$dt[$iiii]['event_description'] = trim($quote);
}
}
}
}
// echoPre($dt);
// die;
// for delete entire data at selected date
if (count($dt) <= 0) {
$dates = $date . " 00:00:00";
$this->event_model->deleteData("event_schedule='{$dates}'");
} else {
$this->event_model->update_data_condt("event_flag=0", "event_schedule='{$date}'");
foreach ($dt as $d) {
$d['event_flag'] = 1;
if (isset($d['event_id']) && $d['event_id'] != '') {
$this->event_model->update_data($d, $d['event_id']);
} else {
$d['event_schedule'] = $date;
$this->event_model->insert_data($d);
}
}
}
Output::App()->redirect($this->config['base_url'] . $this->ctrler . '/show/&date=' . $date);
}