echo $URL_IMG_ROOT . "banner.png"; ?> " height="70%" width="35%"> </span> </div> </div> <div class="content"> <div class="content_title"> <!-- 先留空 只有樣式--> </div> <div class="content_main"> <?php if ($_SESSION['admin']['id'] != 1) { php_call_jbox('error', '您沒有權限訪問此頁面。', URL_ADMIN_ROOT . 'index.php'); } else { include './main.php'; } ?> </div> </div> </div> <div id="footer"> <div class="footer_content"> Copyright @ 2015 Memorable Supplier. All Rights Reserved </div> </div>
$query = 'update `system` set `contact_email` = "' . $contact_email . '", `inquiry_email` = "' . $inquiry_email . '", `web_title` = "' . $web_title . '", `web_description` = "' . $web_description . '", `office_info_phone` = "' . $office_info_phone . '", `office_info_email` = "' . $office_info_email . '", `social_look` = "' . $social_look . '", `social_skin` = "' . $social_skin . '" where id = 1;'; $query = query_despace($query); $result = mysql_query($query); if (!$result) { php_call_jbox('error', '修改失敗', URL_ADMIN_ROOT . 'system'); } php_call_jbox('success', '修改完成', URL_ADMIN_ROOT . 'system'); } ?> <div class="model_content"> <div class="page_title">系統參數</div><hr> <div> <form action="./" method="post"> <table class="system_table"> <!-- <tr> <td class=""> <p class="system_title">Email </p> <div class="admin_tips">接收使用者提交問題的信箱</div> <p>聯繫我們 - 信箱設定 : <input type="email" class="system_text" maxlength="30" name="contact_email" value="<?php echo $row['contact_email']; ?>
//找到此帳號 $_SESSION['admin']['passwd'] = $row['admin_password']; //將密碼丟進去 $_SESSION['admin']['name'] = $row['admin_name']; $_SESSION['admin']['email'] = $row['admin_email']; } if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip = $_SERVER['REMOTE_ADDR']; } $query = 'update `admin` set last_login_time = NOW() , last_login_ip = "' . $ip . '" where id = "' . $_SESSION['admin']['id'] . '" limit 1;'; $query = query_despace($query); if ($result = mysql_query($query)) { js_location(URL_ADMIN_ROOT); } } else { php_call_jbox('error', '帳號或密碼錯誤', URL_ROOT . 'admin'); exit; } } } else { php_call_jbox('error', '操作失敗。', URL_ROOT . 'admin'); } ?> </body> </html>
while ($row = mysql_fetch_array($result)) { $d_product['id'] = $row['product_id']; $d_product['name'] = $row['product_name']; $d_product['description'] = $row['product_description']; $d_product['cover'] = ADMIN_IMG_UPLOAD . 'product/' . $row['product_cover']; $product[] = $d_product; } } else { if ($g_ajax != 'true') { $d_product['id'] = null; $d_product['name'] = null; $d_product['description'] = null; $d_product['cover'] = URL_IMG_ROOT . 'coming_soon2.jpg'; $product[] = $d_product; } } $nav['show_type'] = 'items'; } //顯示"產品介紹頁" if (!empty($nav['categoryarea_id']) && !empty($nav['category_id']) && !empty($g_items)) { $__category = get_nav_category($nav['categoryarea_id']); $query = 'select * from product where `product_id` = ' . $nav['product_id'] . ' and `product_status` = "open" ;'; $query = query_despace($query); $result = mysql_query($query); $product = array(); $product = mysql_fetch_assoc($result); if (empty($product)) { php_call_jbox('error', 'Error. contact us please.', URL_ROOT); } $nav['show_type'] = 'items_content'; }
if (!del_category($category_id)) { php_call_jbox('error', '刪除項目時發生錯誤,請重新操作。', URL_ADMIN_ROOT . 'product/?act=show&type=' . $type); } } //刪除類別 del_categoryarea($id) ? php_call_jbox('success', '刪除資料完成', URL_ADMIN_ROOT . 'product/?act=show&type=' . $type) : php_call_jbox('error', '刪除失敗', URL_ADMIN_ROOT . 'product/?act=show&type=' . $type); } if ($type == 'category') { $category_id[] = $id; //取得項目下的產品ID及刪除產品 $product_id = get_product_id($category_id); if ($product_id != null) { if (!del_product($product_id)) { php_call_jbox('error', '刪除產品時發生錯誤,請重新操作。', URL_ADMIN_ROOT . 'product/?act=show&type=' . $type); } if (!del_product_meta($product_id)) { php_call_jbox('error', '刪除產品描述時發生錯誤,請重新操作。', URL_ADMIN_ROOT . 'product/?act=show&type=' . $type); } } //刪除項目 del_category($category_id) ? php_call_jbox('success', '刪除資料完成', URL_ADMIN_ROOT . 'product/?act=show&type=' . $type) : php_call_jbox('error', '刪除失敗', URL_ADMIN_ROOT . 'product/?act=show&type=' . $type); } if ($type == 'product') { $product_id[] = $id; del_product($product_id) && del_product_meta($product_id) ? php_call_jbox('success', '刪除資料完成', URL_ADMIN_ROOT . 'product/?act=show&type=' . $type) : php_call_jbox('error', '刪除失敗', URL_ADMIN_ROOT . 'product/?act=show&type=' . $type); } } ?> </body> </html>
<?php //0521 改成只抓ID=3的關於公司 $about = array(); $query = 'select * from about where id = 3;'; $query = query_despace($query); $result = mysql_query($query); while ($row = mysql_fetch_assoc($result)) { $data = $row; } $commit = !empty($_POST['about_btn']) ? $_POST['about_btn'] : null; if ($commit == 'Save') { $new_value = $_POST['about_value']; $new_id = 3; if (empty($new_value)) { //輸入的值為空白 js_location($URL_ROOT . 'admin/dashboard/about'); } else { //不為空白時進行更新 $new_value = stripslashes(htmlspecialchars($new_value)); $query = 'UPDATE `about` SET `value` = \'' . $new_value . '\' , `modify_name` = "' . $_SESSION['admin']['name'] . '" ,`modify_time` = NOW() WHERE `about`.`id` = "' . $new_id . '" LIMIT 1 ; '; $query = query_despace($query); $result = mysql_query($query); if ($result) { php_call_jbox('success', '修改成功', URL_ADMIN_ROOT . 'about'); } else { php_call_jbox('error', '修改失敗,請確認您輸入的資料是否有誤', URL_ADMIN_ROOT . 'about'); } } }