本文整理汇总了PHP中tpldir函数的典型用法代码示例。如果您正苦于以下问题:PHP tpldir函数的具体用法?PHP tpldir怎么用?PHP tpldir使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tpldir函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: edit
function edit($id = false)
{
if (empty($_POST)) {
$category = db_read('category');
if (!$category) {
redirect(base_url('admin/category/add'));
}
if (!$id) {
$id = $category->id;
}
$view['blogs'] = db_reads('page', array('type' => 'blog', 'catid' => $id));
$view['categories'] = db_reads('category', array('type' => 'blog'));
$view['category'] = db_read('category', array('id' => $id, 'type' => 'blog'));
$this->load->view(tpldir('admin/category/edit_view'), $view);
} else {
$result = jsonSrc();
$id = $this->input->post('id');
$updatecat['name'] = $this->input->post('name');
db_update('category', array('id' => $id), $updatecat);
$result['resultCode'] = 1000;
$result['resultMsg'] = "Success!!";
$result['resultData']['openUrl'] = base_url('admin/category/edit/' . $id);
echo json_encode($result);
}
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:25,代码来源:Category.php
示例2: index
function index()
{
if ($_SERVER['REQUEST_METHOD'] == "GET") {
$admin_auth = $this->session->userdata('admin_auth');
$login_error = $this->session->userdata('login_error');
$this->session->unset_userdata('login_error');
session_write_close();
if ($admin_auth) {
redirect('admin/dashboard');
}
$view['error'] = $login_error;
$this->load->view(tpldir('admin/login/index_view'), $view);
} else {
$username = $this->input->post('username');
$password = hash('sha256', $this->input->post('password'));
$adminRow = db_read('admin', array('username' => $username, 'password' => $password));
if ($adminRow) {
$this->session->set_userdata('admin_auth', true);
$this->session->set_userdata('adminid', $adminRow->id);
$this->session->set_userdata('admin_user', $adminRow->username);
// redirect(base_url('admin/dashboard'));
} else {
$this->session->set_userdata('login_error', 'Invalid Username / password');
}
redirect('admin/login');
}
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:27,代码来源:Login.php
示例3: googleplus
function googleplus()
{
$share = db_read('mod_share', array('status' => 1, 'name' => 'googleplus'));
if ($share) {
$view['share'] = $share;
$view['sharedetail'] = $share ? db_reads('mod_share_detail', array('relid' => $share->id)) : false;
$this->load->view(tpldir('modules/mod_share/googleplus_view'), $view);
}
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:9,代码来源:Mod_share.php
示例4: edit
function edit($id = false)
{
if (empty($_POST)) {
$shareRow = db_read('mod_share', array('id' => $id));
if ($shareRow->name == 'twitter') {
$shareDetails = db_reads('mod_share_detail', array('relid' => $id));
$view['share_details'] = $shareDetails;
$view['share'] = $shareRow;
$this->load->view(tpldir('admin/extension/share/edit/twitter_view'), $view);
} elseif ($shareRow->name == 'facebook') {
$shareDetails = db_reads('mod_share_detail', array('relid' => $id));
$view['share_details'] = $shareDetails;
$view['share'] = $shareRow;
$this->load->view(tpldir('admin/extension/share/edit/facebook_view'), $view);
} elseif ($shareRow->name == 'googleplus') {
$shareDetails = db_reads('mod_share_detail', array('relid' => $id));
$view['share_details'] = $shareDetails;
$view['share'] = $shareRow;
$this->load->view(tpldir('admin/extension/share/edit/googleplus_view'), $view);
}
} else {
$result = jsonSrc();
$relid = $this->input->post('relid');
$sosmed = $this->input->post('sosmed');
if ($sosmed == 'twitter') {
$updateContent = false;
$updateContent['name'] = 'tweettext';
$updateContent['value'] = $this->input->post('tweettext');
db_update('mod_share_detail', array('relid' => $relid, 'name' => 'tweettext'), $updateContent);
$updateContent = false;
$updateContent['name'] = 'username';
$updateContent['value'] = $this->input->post('username');
db_update('mod_share_detail', array('relid' => $relid, 'name' => 'username'), $updateContent);
$updateContent = false;
$updateContent['name'] = 'hashtag';
$updateContent['value'] = $this->input->post('hashtag');
db_update('mod_share_detail', array('relid' => $relid, 'name' => 'hashtag'), $updateContent);
$updateContent = false;
$updateContent['status'] = $this->input->post('status');
db_update('mod_share', array('id' => $relid), $updateContent);
} elseif ($sosmed == 'facebook') {
$updateContent = false;
$updateContent['status'] = $this->input->post('status');
db_update('mod_share', array('id' => $relid), $updateContent);
} elseif ($sosmed == 'googleplus') {
$updateContent = false;
$updateContent['status'] = $this->input->post('status');
db_update('mod_share', array('id' => $relid), $updateContent);
}
$result['resultCode'] = 1000;
$result['resultMsg'] = "Content Updated";
$result['resultData']['openUrl'] = base_url('admin/share');
echo json_encode($result);
}
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:55,代码来源:Share.php
示例5: search
function search($key = false)
{
$this->load->model('Search_model');
$this->load->model('Encryption_model');
if ($this->input->get('key')) {
$key = $this->Encryption_model->encrypt($this->input->get('key'));
redirect(base_url('page/search/' . $key));
}
$search = $this->Encryption_model->decrypt($key);
$view['search'] = $this->Search_model->reads($search);
$view['search_count'] = $this->Search_model->reads($search, true);
$this->load->view(tpldir('page/search'), $view);
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:13,代码来源:Page.php
示例6: add
function add($category = false)
{
if (empty($_POST)) {
$resultTemplate = $this->mod_template->get();
$view['templates'] = $resultTemplate['resultData'];
$this->load->view(tpldir('admin/event/add_view'), $view);
} else {
$result = jsonSrc();
$result = $this->mod_event->post();
$result['resultData']['openUrl'] = base_url('admin/event');
echo json_encode($result);
}
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:13,代码来源:Event.php
示例7: add
function add()
{
if (empty($_POST)) {
$resultTemplate = $this->mod_template->get();
$view['templates'] = $resultTemplate['resultData'];
$view['pages'] = db_reads('page');
$this->load->view(tpldir('admin/page/add_view'), $view);
} else {
$result = jsonSrc();
$result = $this->mod_page->post();
$result['resultData']['openUrl'] = $this->agent->referrer();
echo json_encode($result);
}
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:14,代码来源:Page.php
示例8: video
function video($id = false)
{
if ($id) {
$video = db_read('mod_video', array('status' => 1, 'id' => $id));
$view['video'] = $video;
$this->load->view(tpldir('page/video'), $view);
} else {
$video = db_reads('mod_video', array('status' => 1));
$count_video = count_db_reads('mod_video', array('status' => 1));
$view['video'] = $video;
$view['count_video'] = $count_video;
$this->load->view(tpldir('page/video-list'), $view);
}
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:14,代码来源:Blog.php
示例9: index
function index($url = false)
{
if ($url) {
$microsite = db_read('mod_microsite', array('url' => $url));
if ($microsite) {
$view['microsite'] = $microsite;
$view['template'] = db_read('mod_microsite_template', array('mid', $microsite->id));
$view['contact'] = db_read('mod_microsite_contact', array('mid', $microsite->id));
$view['content'] = db_reads('mod_microsite_content', array('mid', $microsite->id));
$this->load->view(tpldir('page/microsite'), $view);
return true;
}
}
return false;
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:15,代码来源:Microsite.php
示例10: edit
function edit($id = false)
{
if (empty($_POST)) {
$view['banner'] = db_read('mod_banner', array('id' => $id));
$this->load->view(tpldir('admin/extension/banner/edit_view'), $view);
} else {
$result = jsonSrc();
$id = $this->input->post('id');
$updateBanner['url'] = $this->input->post('url');
$updateBanner['status'] = $this->input->post('status');
db_update('mod_banner', array('id' => $id), $updateBanner);
$result['resultCode'] = 1000;
$result['resultMsg'] = "Banner Updated";
$result['resultData']['openUrl'] = base_url('admin/banner');
echo json_encode($result);
}
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:17,代码来源:Banner.php
示例11: add
function add()
{
if (empty($_POST)) {
$this->load->module('mod_page');
$view['page'] = false;
$pageResult = $this->mod_page->gets();
if ($pageResult['resultCode'] == 1000) {
$view['page'] = $pageResult['resultData']['page'];
}
$this->load->view(tpldir('admin/menu/add_view'), $view);
} else {
$result = jsonSrc();
$this->load->module('mod_menu');
$result = $this->mod_menu->post();
$result['resultData']['openUrl'] = $this->agent->referrer();
echo json_encode($result);
}
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:18,代码来源:Menu.php
示例12: add
function add($type = false)
{
if (empty($_POST)) {
$view['type'] = $type;
$this->load->view(tpldir('admin/extension/footer/add_view'), $view);
} else {
$result = jsonSrc();
$id = $this->input->post('id');
$createFooter['url'] = $this->input->post('url');
$createFooter['name'] = $this->input->post('name');
$createFooter['type'] = $this->input->post('type');
db_create('mod_footer', $createFooter);
$result['resultCode'] = 1000;
$result['resultMsg'] = "Footer Created";
$result['resultData']['openUrl'] = base_url('admin/footer');
echo json_encode($result);
}
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:18,代码来源:Footer.php
示例13: edit
function edit($id = false)
{
if (empty($_POST)) {
if ($id) {
$newsticker = db_read('mod_newsticker', array('id' => $id));
if ($newsticker) {
$view['newsticker'] = $newsticker;
$this->load->view(tpldir('admin/newsticker/edit_view'), $view);
}
}
} else {
$result = jsonSrc();
$update['text'] = $this->input->post('text');
$update['url'] = $this->input->post('url');
$update['status'] = $this->input->post('status');
$id = $this->input->post('id');
db_update('mod_newsticker', array('id' => $id), $update);
$result['resultCode'] = 1000;
$result['resultMsg'] = "Newsticker Updated";
$result['resultData']['openUrl'] = base_url('admin/dashboard');
echo json_encode($result);
}
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:23,代码来源:Newsticker.php
示例14: outclient
function outclient()
{
$view['banner'] = db_reads('mod_banner', array('status' => 1));
$this->load->view(tpldir('modules/mod_banner/index_view'), $view);
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:5,代码来源:Mod_banner.php
示例15: index
function index()
{
$view['newsticker'] = db_reads('mod_newsticker');
$this->load->view(tpldir('admin/dashboard_view'), $view);
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:5,代码来源:Dashboard.php
示例16: base_url
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Surakarta.go.id</a>
</div>
<!-- Top Menu Items -->
<ul class="nav navbar-right top-nav"> <!-- menu kanan -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> Administrator <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="#"><i class="fa fa-fw fa-gear"></i> Settings</a>
</li>
<li class="divider"></li>
<li>
<a href="<?php
echo base_url('admin/login/out');
?>
"><i class="fa fa-fw fa-power-off"></i> Log Out</a>
</li>
</ul>
</li>
</ul>
<?php
$this->load->view(tpldir('admin/sidebar_view'));
?>
</nav>
开发者ID:xikyu46,项目名称:whitecms,代码行数:31,代码来源:navbar_view.php
示例17: announce
function announce($id = false)
{
$order['date'] = 'desc';
$_GET['nopage'] = true;
$view['news'] = db_reads('page', array('type' => 'news', 'status' => 1, 'catid' => 9), $order);
$_GET['nopage'] = false;
$this->load->view(tpldir('modules/mod_news/announce_view'), $view);
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:8,代码来源:Mod_news.php
示例18: index
function index()
{
$this->load->view(tpldir('admin/extension/index_view'));
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:4,代码来源:Extension.php
示例19: outclient
function outclient()
{
$view['sosmed'] = db_reads('mod_sosmed', array('status' => 1, 'name !=' => 'custom'));
$this->load->view(tpldir('modules/mod_sosmed/index_view'), $view);
}
开发者ID:xikyu46,项目名称:whitecms,代码行数:5,代码来源:Mod_sosmed.php
示例20: formGeneral
echo "checked";
}
?>
> active
</label>
</div>
<div class="form-group">
<input type="hidden" name="sosmed" value="twitter">
<input type="hidden" name="relid" value="<?php
echo $shareRow->relid;
?>
">
<input class="btn btn-success" type="submit" value="Submit">
</div>
<?php
}
?>
</form>
</div> <!-- end: panel body -->
</div> <!-- end: panel -->
</div>
</div>
</div> <!-- end: page content container -->
<script>
formGeneral('#formNwsEdit');
</script>
<?php
$this->load->view(tpldir('admin/footer_view'));
开发者ID:xikyu46,项目名称:whitecms,代码行数:30,代码来源:twitter_view.php
注:本文中的tpldir函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论