public function sign_action() { if (!$this->input->is_ajax_request()) { show_404(); } $e = $this->input->post('name', true); $c = $this->input->post('captcha', true); $p = $this->input->post('password', true); $e = strtolower(trim($e)); $p = strtolower(trim($p)); $c = strtolower(trim($c)); $sess = $this->session->userdata('captcha'); if (md5($c) != $sess) { JSON('error', '验证码输入有误!'); } /** 登录用户登录状态 */ $user = $this->auth->checkuserlogin($e, $p); if (false === $user) { JSON('error', '用户名或密码错误!'); } $arr = explode('|', config_item('site_admin_uid')); if (!$user->uid or !in_array($user->uid, $arr)) { JSON('error', '你的账号状态不正常!'); } /** 处理用户登录 */ $this->auth->process_login($user); JSON('success', '登录成功!', admin_site_url()); }
public function __construct() { parent::__construct(); if (!$this->auth->islogin()) { redirect(admin_site_url('sign')); } //检测是否有权限登录管理后台 $arr = explode('|', config_item('site_admin_uid')); $uid = (int) $this->auth->user('uid'); if (!$uid or !in_array($uid, $arr)) { redirect(admin_site_url('sign')); } }
<td><a href="<?php echo admin_site_url('category/update/' . $v->cid); ?> " class="update glyphicon glyphicon-pencil"></a> <a href="<?php echo admin_site_url('category/delete/' . $v->cid); ?> " class="delete glyphicon glyphicon-remove"></a></td> </tr> <?php } ?> <?php } else { ?> <tr><td colspan="4" class="null">还没有分类,赶快去 <a href="<?php echo admin_site_url('category/create'); ?> ">添加分类</a> 吧!</td></tr> <?php } ?> </table> <div id="page"> <p class="fl"></p> <p class="fr"> <span>共有 <?php echo $rows; ?> 个分类,每页显示 <?php echo $pres;
if (num >= 4 ) return false; var str = '<input type="color" id="color" name="color[]"/>'; $('#sexi').before(str); }); $('#biaoqian').on('click', function(){ var td = $('#biaoqian').closest('td'); var num = td.find('input').length; if (num >= 4 ) return false; var str = '<input type="text" id="tag" name="tag[]" class="form-group-sm form-control" maxlength="64" style="margin:0 7px 3px 0;width: 500px;" />'; $('#biaoqian').before(str); }); }); </script> <div class="col-sm-10 fx-main"> <form id="exampleform" method="post" action="<?php echo admin_site_url('example/createAction'); ?> " enctype="multipart/form-data"> <table border="0" cellpadding="0" cellspacing="0" class="form"> <tr> <th width="100px">案例名称</th> <td widht="*" id="article"> <input type="text" id="name" name="name" class="form-group-sm form-control" maxlength="10" style="margin:0 7px 3px 0;width: 500px;" placeholder="最多10个字" /> </td> </tr> <tr> <th>案例序号</th> <td> <input type="text" id="sort" name="sort" class="form-group-sm form-control" maxlength="10" style="margin:0 7px 3px 0;width: 500px;" placeholder="从0开始,数字越小排序越靠前" /> </td> </tr>
<td><a href="<?php echo admin_site_url('link/update/' . $v->lid); ?> " class="update">编辑</a> - <a href="javascript:;" class="delete" onClick="deleteLinkById(this, <?php echo $v->lid; ?> )">删除</a></td> </tr> <?php } ?> <?php } else { ?> <tr><td colspan="5" class="null">还没有链接,赶快去 <a href="<?php echo admin_site_url('link/create'); ?> ">添加链接</a> 吧!</td></tr> <?php } ?> </table> <div id="page"> <p class="fl"></p> <p class="fr"> <span>共有 <?php echo $rows; ?> 个分类,每页显示 <?php echo $pres;
} ?> <a href="javascript:;" class="delete glyphicon glyphicon-remove" onClick="deleteArticleById(this, <?php echo $v->aid; ?> )" alt="彻底删除"></a> </td> </tr> <?php } ?> <?php } else { ?> <tr><td colspan="5" class="null">还没有文章,赶快去 <a href="<?php echo admin_site_url('article/create'); ?> ">写文章</a> 吧!</td></tr> <?php } ?> </table> <?php if ($list) { ?> <div id="page"> <p class="fl"> <select id="action" name="action"> <?php if ($type == 'trash') {
x1: 0, y1: 0, x2: 160, y2: 120, minWidth: 160, minHeight: 120, handles: true, aspectRatio: '4:4', onSelectChange: preview }); }) .error( function() { } ) .attr('src', path); function preview(img, selection) { if ( selection.width && selection.height ) { $('#x').val(selection.x1); $('#y').val(selection.y1); $('#w').val(selection.width); $('#h').val(selection.height); } } }); </script> </head> <body> <form id="cropimage" method="post" action="<?php echo admin_site_url('huangye/crop_image_action'); ?> "></form> </body> </html>
</table> </form> </div><!-- /.fx-main --> <script type="text/javascript"> $(function() { $('#userform').ajaxForm({ dataType: 'json', beforeSubmit: function() { $('.ajax-load-wait').show(); }, success: function(responseText, statusText, xhr, form) { $('.formtip').html(responseText.info).addClass(responseText.code); $('.ajax-load-wait').hide(); if( responseText.code === 'success' ) { form.clearForm(); setTimeout(function() { window.location = '<?php echo admin_site_url('user'); ?> '; }, 2500); } } }); $('.bs-docs-sidenav').children('li').eq(5).addClass('active'); $('.menu-user-all').addClass('active-min'); }); </script> <?php $this->load->view('admin_menu');
?> " class="update">编辑</a> - <a href="<?php echo admin_site_url('user/delete/' . $v->uid); ?> " class="delete">删除</a> </td> </tr> <?php } ?> <?php } else { ?> <tr><td colspan="5" class="null">还没有用户,赶快去 <a href="<?php echo admin_site_url('user/create'); ?> ">创建用户</a> 吧!</td></tr> <?php } ?> </table> </form> </div><!-- /.fx-main --> <script type="text/javascript"> $(function() { $('.bs-docs-sidenav').children('li').eq(5).addClass('active'); $('.menu-user-all').addClass('active-min'); }); </script> <?php
form.hide(); setTimeout(function() { window.location = '<?php echo admin_site_url('page'); ?> '; }, 2500); } } }); }); }); </script> <div class="col-sm-10 fx-main"> <form id="pageform" method="post" action="<?php echo admin_site_url('page/create_action'); ?> "> <table border="0" cellpadding="0" cellspacing="0" class="form"> <tr> <th width="100px">页面名称</th> <td widht="*" id="article"> <input type="text" id="name" name="name" class="input-item-text" maxlength="64" placeholder="页面名称,比如“关于我们”" title="页面名称" style="width:280px; margin:0 7px 3px 0" /> <input type="text" id="link" name="link" class="input-item-text" maxlength="64" placeholder="页面链接,比如“about”" title="页面名称" style="width:180px; margin:0 7px 3px 0" /> <a href="javascript:;" style="margin-left:6px" onClick="showOptionBox(this)">页面选项 »</a> <div class="option-multi-item hide"> <input type="text" id="sort" name="sort" class="input-item-text" value="255" maxlength="3" placeholder="页面显示顺序" title="页面显示顺序" /> <p class="tips">该页面在相应位的显示顺序,该项只能是数字并且最大不能超过 255</p> <input type="text" id="keyword" name="keyword" class="input-item-text" maxlength="120" placeholder="页面关键字" title="页面关键字" /> <p class="tips">该页面的关键字(keywords),用空格分隔,长度不要超过 80 个字符</p>
" class="ajax-load-wait hide" title="loading..." /></p> </form> </div><!-- /.fx-main --> <script type="text/javascript"> $(function() { $('.bs-docs-sidenav').children('li').eq(5).addClass('active'); $('.menu-user-all').addClass('active-min'); $('#userform').ajaxForm({ dataType: 'json', beforeSubmit: function() { $('.ajax-load-wait').show(); }, success: function(responseText, statusText, xhr, form) { $('.formtip').html(responseText.info).addClass(responseText.code); $('.ajax-load-wait').hide(); if( responseText.code === 'success' ) { $('#categoryfrom').hide(); setTimeout(function() { window.location = '<?php echo admin_site_url('category'); ?> '; }, 2500); } } }); }); </script> <?php $this->load->view('admin_menu');
<?php $this->load->view('admin_header'); ?> <div class="col-sm-10 fx-main"> <form id="tagmergeform" method="post" action="<?php echo admin_site_url('tag/merge_action'); ?> "> <p> <label>来源标签:</label> <select name="from_tid"> <?php if ($list) { ?> <option value="0" <?php if ($curr === 0) { echo 'selected'; } ?> >- 选择来源标签 -</option> <?php foreach ($list as $k => $v) { ?> <option value="<?php echo $v->tid; ?> " <?php if ($v->tid == $curr) { echo 'selected'; }
?> '; }, 1000); } } }); }); </script> </head> <body> <div class="sign-container"> <div id="sign"> <div class="sign-top"><div class="sign-top-logo"> <em></em></div></div> <div class="sign-form"> <form id="signform" class="form-horizontal" role="form" method="post" action="<?php echo admin_site_url('sign/sign_action'); ?> "> <p id="loading" class="alert alert-warning" style="display:none;"></p> <div class="form-group"> <input type="text" class="input-item-text form-control" name="name" id="name" placeholder="用户名"> </div> <div class="form-group"> <input type="password" name="password" class="input-item-text form-control" id="password" placeholder="密码"> </div> <div class="form-group"> <input type="text" class="captcha form-control" name="captcha" id="captcha" placeholder="验证码" maxlength="4"/> <img src="<?php echo site_url('captcha/output/4?t=' . time()); ?> " title="Click Refresh Captcha" onClick="this.src='<?php
echo admin_site_url('page'); ?> '; }, 2500); } } }); }); }); </script> <div class="col-sm-10 fx-main"> <p class="formtip">更新这个页面的信息,并将重新发布。</p> <form id="pageform" method="post" action="<?php echo admin_site_url('page/update_action'); ?> "> <table border="0" cellpadding="0" cellspacing="0" class="form"> <tr> <th width="100px">页面名称</th> <td widht="*" id="article"> <input type="text" id="name" name="name" class="input-item-text" maxlength="64" placeholder="页面名称,比如“关于我们”" title="页面名称" style="width:280px; margin:0 7px 3px 0" value="<?php echo $page->name; ?> " /> <input type="text" id="link" name="link" class="input-item-text" maxlength="64" placeholder="页面链接,比如“about”" title="页面名称" style="width:180px; margin:0 7px 3px 0" value="<?php echo $page->link; ?> " /> <a href="javascript:;" style="margin-left:6px" onClick="showOptionBox(this)">页面选项 »</a>
}); $('#biaoqian').on('click', function(){ var td = $('#biaoqian').closest('td'); var num = td.find('input').length; if (num >= 4 ) return false; var str = '<input type="text" id="tag" name="tag[]" class="form-group-sm form-control" maxlength="64" style="margin:0 7px 3px 0;width: 500px;" />'; $('#biaoqian').before(str); }); }); </script> <div class="col-sm-10 fx-main"> <?php if (!empty($example)) { ?> <form id="exampleform" method="post" action="<?php echo admin_site_url('example/updateAction'); ?> " enctype="multipart/form-data"> <table border="0" cellpadding="0" cellspacing="0" class="form"> <tr> <th width="100px">案例名称</th> <td widht="*" id="article"> <input type="text" id="name" name="name" class="form-group-sm form-control" maxlength="10" style="margin:0 7px 3px 0;width: 500px;" value="<?php echo $example->name; ?> " placeholder="最多10个字" /> </td> </tr> <tr> <th>案例序号</th> <td>
?> " class="update">编辑</a> - <a href="javascript:;" class="delete" onClick="deletePageById(this, <?php echo $v->pid; ?> )">删除</a> </td> </tr> <?php } ?> <?php } else { ?> <tr><td colspan="5" class="null">还没有页面,赶快去 <a href="<?php echo admin_site_url('page/create'); ?> ">创建页面</a> 吧!</td></tr> <?php } ?> </table> <?php if ($list) { ?> <div id="page"> <p class="fr"> <span>共有 <?php echo $rows; ?>
">编辑</a> <a href="<?php echo admin_site_url('example/delete/' . $value->id); ?> " class="btn-delete">删除</a> </td> </tr> <?php } ?> <?php } else { ?> <tr> <td colspan="5">还没有案例,赶快去 <a href="<?php echo admin_site_url('example/create'); ?> ">添加</a> 吧!</td> </tr> <?php } ?> </table> <?php if ($list) { ?> <div id="page"> <p class="fr"> <span>共有 <?php echo $rows; ?>
<?php $this->load->view('admin_menu'); ?> </td> <td id="main" width="*"> <div id="here"> <p class="tit fl">管理面板 » 黄页</p> <p class="opt fr"><?php $this->load->view('admin_curr_user'); ?> </p> </div> <div id="container"> <form id="articleform" method="post" action="<?php echo admin_site_url('huangye/create_action'); ?> "> <table border="0" cellpadding="0" cellspacing="0" class="form"> <tr> <th width="100px">标题</th> <td widht="*" id="article"> <input type="text" id="title" name="title" class="input-item-text" maxlength="64" style="margin:0 7px 3px 0" /> <div class="option-multi-item"> <input type="text" id="fromurl" name="fromurl" class="input-item-text" placeholder="文章来源地址" title="文章来源地址" /> <p class="tips">填写外链地址,需要加 http://<em>链接地址</em></p> </div> </td> </tr> <tr> <th>内容</th>
$('.formtip').html($('#name').siblings('.tips').text()).addClass('error'); return false; } if( $.trim($('#link').val()) === '' ) { $('.formtip').html($('#link').siblings('.tips').text()).addClass('error'); return false; } $('.ajax-load-wait').show(); }, success: function(responseText, statusText, xhr, form) { $('.formtip').html(responseText.info).addClass(responseText.code); $('.ajax-load-wait').hide(); if( responseText.code === 'success' ) { setTimeout(function() { window.location = '<?php echo admin_site_url('link'); ?> '; }, 2500); } } }); $('.bs-docs-sidenav').children('li').eq(4).addClass('active'); $('.menu-link-all').addClass('active-min'); }); </script> <?php $this->load->view('admin_menu');
<p class="fl"><strong><a href="<?php echo site_url('tag/' . $v->slug); ?> " target="_blank"><?php echo $v->name; ?> </a></strong><em title="共计 <?php echo $v->total; ?> 篇文章"><?php echo $v->total; ?> </em></p> <p class="fr"> <a href="<?php echo admin_site_url('tag/merge/' . $v->tid); ?> ">合并</a> <a href="javascript:;" onClick="deleteTagById(this, <?php echo $v->tid; ?> )">删除</a> </p> </li> <?php } ?> </ul> <?php } else { ?>
}, 3000); if( responseText.code === 'success' ) { $('#draftid').val(responseText.data); } } }); }); $('.bs-docs-sidenav').children('li').eq(0).addClass('active'); $('.menu-article-create').addClass('active-min'); }); </script> <div class="col-sm-10 fx-main"> <form id="articleform" method="post" action="<?php echo admin_site_url('article/create_action'); ?> " enctype="multipart/form-data"> <table border="0" cellpadding="0" cellspacing="0" class="form"> <tr> <th width="100px">标题</th> <td widht="*" id="article"> <input type="text" id="title" name="title" class="form-group-sm form-control" maxlength="64" style="margin:0 7px 3px 0" /> <select id="cid" name="cid"> <?php if ($category) { ?> <?php foreach ($category as $k => $v) { ?> <option value="<?php
您好,<strong><?php echo $this->auth->user('username'); ?> </strong> - <?php echo anchor(admin_site_url('sign/out'), '退出面板'); ?> - <?php echo anchor(admin_site_url(), '管理面板'); ?> - <?php echo anchor(site_url(), '网站首页', array('target' => '_blank'));