Example #1
0
include '../head.php';
?>
<body class="hold-transition skin-blue sidebar-mini">
<!-- Site wrapper -->
<div class="wrapper">
	<?php 
include '../header.php';
?>
	<?php 
include '../navbar.php';
?>
	<?php 
$query = query_despace('select * from `admin`;');
$result = mysql_query($query);
if (!$result) {
    redirect_php(URL_ADMIN2_ROOT);
}
$a_admin = array();
while ($row = mysql_fetch_assoc($result)) {
    $a_admin[] = $row;
}
?>
	<div class="content-wrapper">
		<section class="content-header">
			<div class="box-body"><h2>管理員設定</h2></div>
			<h1>				
				<small><p class="text-light-blue">(若不需修改密碼請將該欄位留空)</p></small>
			</h1>
			<ol class="breadcrumb">
				<li><a href="<?php 
echo URL_ADMIN2_ROOT . 'system/admin.php';
Example #2
0
<?php

//1221 - server PHP版本關係,以下不可改為 ['a','b',....]的格式
$key_act = array('show', 'edit', 'add', 'tags', 'description');
$key_type = array('categoryarea', 'category', 'product');
empty($_GET['act']) || $_GET['act'] == '' || !in_array($_GET['act'], $key_act) ? redirect_php(URL_ROOT) : ($act = $_GET['act']);
//新增資料的view
if ($act == 'add') {
    //type不在範圍內
    if (!in_array($_GET['type'], $key_type)) {
        js_location(URL_ADMIN_ROOT . '/product');
    }
    //新增類別
    if ($_GET['type'] == 'categoryarea') {
        ?>
		<div class="page_title">新增類別</div><hr>
		<div class="admin_tips">圖片建議上傳png/jpg/jpef格式,大小為240px * 320 px</div>
		<form method="post" action="./action.php?act=add&type=<?php 
        echo $_GET['type'];
        ?>
" id="categoryarea_form">
			<table class="table table-bordered table-hover ">
				<tr>
					<td style="text-align:right" class="info product_add_table_td">名稱:</td>
					<td> <input class="form-control" maxlength="35" name="categoryarea_name" type="text" placeholder="類別名稱"> </td>
				</tr>
				<tr>
					<td style="text-align:right" class="info product_add_table_td">優先序:</td>
					<td> <input class="form-control" maxlength="3" name="categoryarea_priority" type="text" placeholder="數值範圍 : 1 ~ 255"> </td>
				</tr>
				<tr>
Example #3
0
<?php

$config = dirname(dirname(__FILE__));
include $config . '/config/global.php';
include $config . '/config/function_admin2.php';
?>
<!DOCTYPE html>
<html>
<body class="hold-transition login-page">
<?php 
isset($_SESSION['admin']) ? redirect_php(URL_ADMIN2_ROOT . 'charts/') : redirect_php(URL_ADMIN2_ROOT . 'index/login.php');
?>
</body>
</html>
Example #4
0
echo strtoupper(P_CLASS) . '-' . P_FUNCTION;
?>
 | Admin System</title>
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<?php 
/**
 * 1228 不同CLASS及FUNCTION 載入不同靜態檔案,避免影響速度
 */
$p_class = P_CLASS;
$p_function = P_FUNCTION;
$obj = !class_exists($p_class) ? redirect_php(URL_ADMIN2_ROOT) : new $p_class();
if (P_CLASS == 'system' && P_FUNCTION == 'admin' && $_SESSION['admin']['id'] != 1) {
    js_location(URL_ADMIN2_ROOT . 'about/', '您並非最高管理員,目前沒有訪問此頁面的權限');
}
if (P_CLASS != 'index' && P_FUNCTION != 'login' && !isset($_SESSION['admin'])) {
    redirect_php(URL_ADMIN2_ROOT . 'index/login.php');
}
$common_css = array('bootstrap/css/bootstrap.min.css', 'adminlte/css/AdminLTE.min.css', 'adminlte/css/_all-skins.min.css', 'plugins/icheck/all.css', 'plugins/font-awesome/css/font-awesome.css', '../../lib/jbox/jBox.css');
$common_js = array('js/jquery_2.1.4.min.js', 'bootstrap/js/bootstrap.min.js', 'adminlte/js/app.min.js', 'adminlte/js/demo.js', '../../lib/jbox/jBox.js');
//Display css&js html tag
list($css_file, $js_file) = $obj::$p_function($common_css, $common_js);
admin_set_css($css_file);
admin_set_js($js_file);
?>
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
	<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
	
	<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
	<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
	<!--[if lt IE 9]>
	<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
Example #5
0
include './../config/function.php';
include './../lib/js/captcha/simple-php-captcha.php';
$_SESSION['captcha'] = simple_php_captcha();
$_SESSION['inquiry_code'] = $_SESSION['captcha']['code'];
$_this_name = null;
$_this_description = null;
$_this_cover = null;
$category = array();
$product = array();
$g_goods = !empty($_GET['goods']) ? base64_decode($_GET['goods']) : redirect_php($URL_ROOT);
$g_category = !empty($_GET['category']) ? base64_decode($_GET['category']) : null;
$g_items = !empty($_GET['items']) ? base64_decode($_GET['items']) : null;
$g_pages = !empty($_GET['pages']) ? $_GET['pages'] : 1;
$g_ajax = !empty($_GET['ajax']) ? $_GET['ajax'] : 'false';
if (empty($g_goods) && empty($g_category) && empty($g_items)) {
    redirect_php($URL_ROOT);
}
$meta = array('`web_title`', '`web_description`', '`social_look`', '`social_skin`');
$meta = get_settings($meta);
if (!empty($g_items)) {
    //內頁
    $query = 'select `product_name`,`product_cover`,`product_description`,`product_memo` from `product` where `product`.`product_status` and `product_id` = ' . $g_items . ';';
    $result = mysql_query($query);
    if ($result) {
        $row = mysql_fetch_assoc($result);
    }
    $_this_name = empty($row['product_name']) ? null : $row['product_name'];
    $_this_description = empty($row['product_description']) ? null : $row['product_description'];
    $_this_description .= empty($row['product_memo']) ? null : '. ' . $row['product_memo'];
    $_this_cover = empty($row['product_cover']) ? null : $row['product_cover'];
} elseif (!empty($g_category)) {