function removeButton(i){ $("#remove-recipes-"+i).removeClass("hidden"); $("#remove-recipes-"+i).fadeIn("fast"); $("#btn-news-"+i).attr('style','z-index:1000; position:absolute'); $("#recipes-"+i).mouseleave(function(){ $("#remove-recipes-"+i).fadeOut("fast"); }); } function clearImage(i){ $("#upload-recipes-"+i).attr('src', ''); $("#upload-recipes-"+i).addClass("hidden"); $('#custom-recipe').html('<input type="file" name="upload_news_1" id="news-1" onchange="readURL(this,1)" class="hidden"/>'); $("#recipes-flag").val(''); } function cancelEdit(){ location.href = "http://<?php echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/recipe-detail/" . $request_recipe_name; ?> "; } </script> <?php $sql = "UPDATE tbl_recipes SET `category_recipes` = '{$post_category_recipes}',\n `recipe_name` = '{$post_recipe_name}',\n\t\t\t\t\t\t\t\t\t`recipe_image` = '{$post_recipe_image}',\n\t\t\t\t\t\t\t\t\t`recipe_date` = '{$post_recipe_date}',\n\t\t\t\t\t\t\t\t\t`recipe_ingredients` = '{$post_recipe_ingredients}',\n\t\t\t\t\t\t\t\t\t`recipe_sauce` = '{$post_recipe_sauce}',\n\t\t\t\t\t\t\t\t\t`method` = '{$post_recipe_method}',\n\t\t\t\t\t\t\t\t\t`alias` = '{$post_recipe_alias}',\n\t\t\t\t\t\t\t\t\t`visibility_status` = '{$post_recipe_visibility}',\n\t\t\t\t\t\t\t\t\t`additional` = '{$post_recipe_additional}'\n\t\t\t WHERE `recipe_id` = '{$post_recipe_id}'"; echo $sql; ?>
private function on_rename() { $path = $this->path; $old_name = gpc('fs-oname'); $new_name = gpc('fs-nname'); $old_path = get_dirname($path) . '/' . $new_name; $new_path = get_dirname($path) . '../uploadfiles/' . $new_name; $this->code = $this->FileFS->rename($path, $new_path) ? 200 : 300; $this->mess = $this->FileFS->error(); $this->show(); }
$post_method = addslashes($_POST['recipe_method']); $getRecords = getRecords($post_recipes_name); if ($_POST['btn-add-recipes'] == "Save Changes" || $_POST['btn-add-recipes'] == "Save Changes & Exit") { $checkName = getName($post_recipes_name); if ($checkName['rows'] > 0) { for ($i = 0; $i <= $getRecords['rows']; $i++) { $recipe_name = cleanurl($post_recipes_name . randomchr()); } } else { $recipe_name = cleanurl($post_recipes_name); } $uploads_dir = '../files/uploads/recipes_image/'; $userfile_name = str_replace(array('(', ')', ' '), '_', $_FILES['upload_recipes_1']['name']); $userfile_tmp = $_FILES['upload_recipes_1']['tmp_name']; $prefix = 'recipes_image-'; $prod_img = $uploads_dir . $prefix . $userfile_name; move_uploaded_file($userfile_tmp, $prod_img); $slider_image = $prefix . $userfile_name; $filename = "files/uploads/recipes_image/" . $slider_image; addNews($post_category_recipes, $post_recipes_name, $filename, $post_recipes_date, $post_ingredients, $post_sauce, $post_method, cleanurl($recipe_name), 'Visible', 'top'); if ($_POST['btn-add-recipes'] == "Save Changes & Exit") { ?> <script> location.href = "http://<?php echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/recipe-detail/" . cleanurl($recipe_name); ?> "; </script> <?php } }
$listing_order = $_get->get_categories(1, $parent_id, $search_query, $sort_by, $first_record, $query_per_page); /* --- HANDLING ARROW SORTING --- */ $arr_order_number = ''; if (isset($_REQUEST['srt'])) { if ($_REQUEST['srt'] == "category_name DESC") { $arr_order_number = "<span class=\"sort-arrow-up\"></span>"; } else { if ($_REQUEST['srt'] == "category_name") { $arr_order_number = "<span class=\"sort-arrow-down\"></span>"; } else { $arr_order_number = "<span class=\"sort-arrow-down\"></span>"; } } } /* --- STORED VALUE --- */ echo "<input type=\"hidden\" name=\"url\" id=\"url\" class=\"hidden\" value=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/child-category-view/" . $_REQUEST['cid'] . "/" . $_REQUEST['cname'] . "\">\n"; echo "<input type=\"hidden\" name=\"page\" id=\"page\" class=\"hidden\" value=\"" . $page . "\" /> \n"; echo "<input type=\"hidden\" name=\"query_per_page\" id=\"query_per_page\" class=\"hidden\" value=\"" . $query_per_page . "\" /> \n"; echo "<input type=\"hidden\" name=\"total_page\" id=\"total_page\" class=\"hidden\" value=\"" . ceil($full_order['total_query'] / $query_per_page) . "\" /> \n"; echo "<input type=\"hidden\" name=\"sort_by\" id=\"sort_by\" class=\"hidden\" value=\"" . $sort_by . "\" /> \n"; echo "<input type=\"hidden\" name=\"search\" id=\"search\" class=\"hidden\" value=\"" . $search_parameter . "-" . $search_value . "\" /> \n"; /* -- BUTTON RESET -- */ if (empty($search_parameter)) { $reset = "hidden"; } else { $reset = ""; } /* --- BUTTON HANDLER --- */ if (isset($_POST['btn_child_category'])) { $category_id = $_POST['category_id']; if ($_POST['category-action'] == "delete") {
/* --- STORED VALUE --- */ echo "<input type=\"hidden\" name=\"url\" id=\"url\" class=\"hidden\" value=\"http://".$_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])."/news-view\">\n"; echo "<input type=\"hidden\" name=\"page\" id=\"page\" class=\"hidden\" value=\"".$page."\" /> \n"; echo "<input type=\"hidden\" name=\"current_category\" id=\"current_category\" class=\"hidden\" value=\""; if($cat == '1'){ echo 'top'; }else{ echo $req_category; } echo "\" /> \n"; echo "<input type=\"hidden\" name=\"query_per_page\" id=\"query_per_page\" class=\"hidden\" value=\"".$query_per_page."\" /> \n"; echo "<input type=\"hidden\" name=\"total_page\" id=\"total_page\" class=\"hidden\" value=\"".$total_page."\" /> \n"; echo "<input type=\"hidden\" name=\"sort_by\" id=\"sort_by\" class=\"hidden\" value=\"".$sort_by."\" /> \n"; echo "<input type=\"hidden\" name=\"search\" id=\"search\" class=\"hidden\" value=\"".$search_parameter."-".$search_value."\" /> \n"; echo "<input type=\"hidden\" name=\"alternate-url\" id=\"alternate-url\" class=\"hidden\" value=\"http://".$_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])."/news\" /> \n"; /* -- BUTTON RESET -- */ if(empty($search_parameter)){ $reset = "hidden"; }else{ $reset = ""; } /* --- BUTTON HANDLER --- */ if(isset($_POST['btn-index-news']) && $_POST['btn-index-news'] == 'GO'){ if(!empty($_POST['news_id'])){
$('#custom_lang').html($('#custom_lang').html()+'<div id="custom_lang_select"></div>'); $('#custom_lang_select').html('<br /><select class="form-control" id="id-language-option" disabled="disabled"><option value="ID" <?php echo $_selected_lang_id; ?> >Indonesia</option><option value="EN" <?php echo $_selected_lang_en; ?> >English</option></select>'); } function changeLanguage(lang_dir){ var lang = $('#lang_option option:selected').val(); location.href = '<?php echo 'http://' . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . '/'; ?> '+lang+'/'+lang_dir; } function selectOptionLanguage(x){ if(x != ''){ $('#id_custom_select_lang option[value="'+x+'"]').attr('selected', true); }else{ $('#id_custom_select_lang option[value="default"]').attr('selected', true); } }
} // CALL FUNCTION $conn = connDB(); // SELECT DATABASE mysql_select_db("presentation", $conn); // GET DIRNAME function get_dirname($path) { $current_dir = dirname($path); if ($current_dir == "/" || $current_dir == "\\") { $current_dir = ''; } return $current_dir; } //STORED VALUE echo "<input type=\"hidden\" name=\"url\" id=\"url\" class=\"hidden\" value=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/reporting/inventory\">\n"; ?> <?php /** Error reporting */ //error_reporting(E_ALL); /** Include path **/ ini_set('include_path', ini_get('include_path') . ';../Classes/'); /** PHPExcel */ include '../../static/PHPExcel.php'; /** PHPExcel_Writer_Excel2007 */ include '../../static/PHPExcel/Writer/Excel2007.php'; // Create new PHPExcel object echo date('H:i:s') . " Create new PHPExcel object\n"; $objPHPExcel = new PHPExcel(); // Set properties
$arr_type_price = "<span class=\"sort-arrow-down\"></span>"; }else if($_REQUEST['srt'] == "type_price"){ $arr_type_price = "<span class=\"sort-arrow-up\"></span>"; }else if($_REQUEST['srt'] == "type_visibility DESC"){ $arr_type_visibility = "<span class=\"sort-arrow-down\"></span>"; }else if($_REQUEST['srt'] == "type_visibility"){ $arr_type_visibility = "<span class=\"sort-arrow-up\"></span>"; } } /* --- STORED VALUE --- */ echo "<input type=\"text\" name=\"url\" id=\"url\" class=\"hidden\" value=\"http://".$_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])."/product-view/".$_active_class."\">\n"; echo "<input type=\"text\" name=\"page\" id=\"page\" class=\"hidden\" value=\"".$page."\" /> \n"; echo "<input type=\"text\" name=\"current_category\" id=\"current_category\" class=\"hidden\" value=\""; if($cat == 'top'){ echo 'top'; }else{ echo $_REQUEST['cat']; } echo "\" /> \n"; echo "<input type=\"text\" name=\"query_per_page\" id=\"query_per_page\" class=\"hidden\" value=\"".$query_per_page."\" /> \n"; echo "<input type=\"text\" name=\"total_page\" id=\"total_page\" class=\"hidden\" value=\"".$total_page."\" /> \n"; echo "<input type=\"text\" name=\"sort_by\" id=\"sort_by\" class=\"hidden\" value=\"".$sort_by."\" /> \n"; echo "<input type=\"text\" name=\"search\" id=\"search\" class=\"hidden\" value=\"".$search_parameter."-".$search_value."\" /> \n";
if ($act == "settings/shipping/detail/edit") { echo "<li><a href=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/\">Home</a></li>"; echo "<li class=\"bread-arrow\"></li>"; echo "<li><a href=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/shipping\">Settings</a></li>"; echo "<li class=\"bread-arrow\"></li>"; echo "<li><a href=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/shipping\">Shipping</a></li>"; echo "<li class=\"bread-arrow\"></li>"; echo "<li><a href=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/shipping/" . $courier_name['courier_id'] . "\">" . $courier_name['courier_name'] . "</a></li>"; echo "<li class=\"bread-arrow\"></li>"; echo "<li class=\"selected\">Edit: " . $courier_name['courier_name'] . "</li>"; /* STOCK MANAGER */ } else { if ($act == "products/stock/sizemanager") { echo "<li><a href=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/\">Home</a></li>"; echo "<li class=\"bread-arrow\"></li>"; echo "<li><a href=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/stock-manager\">Products</a></li>"; echo "<li class=\"bread-arrow\"></li>"; echo "<li class=\"selected\">Stock Manager</a></li>"; } } } } } } } } } } } } }
if($_SESSION['alert_front'] != "error"){ header("Location:http://".$_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])."/my-account/"); }else{ header("Location:http://".$_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])."/login"); } */ } else { if (isset($_POST['btn_confirm'])) { if ($_SESSION['alert'] == "error") { header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/confirm"); } else { header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/admin/emails/admin_confirmed.php?act=&ornum=" . clean_alphanumeric($_POST['order_number']) . "&amount=" . clean_number($_POST['order_confirm_amount'])); } } else { if (isset($_POST['btn_contact'])) { header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/contact"); } else { if (isset($_POST['btn_search'])) { header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/shop-search/name-" . $_POST['search_bar']); } else { if ($_POST['btn_edit_account']) { header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/account-details"); } else { if ($_REQUEST['act'] == "order_/wishlist" && $_SESSION['user_id'] == null) { header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/login"); } } } } } }
echo $arr_courier_description; ?> </th> <th class="sort" width="250" onclick="sortBy('services')">Services<?php echo $arr_service; ?> </th> <th class="sort" width="190" onclick="sortBy('active_status')">Price<?php echo $arr_active_status; ?> </th> </tr> <tr class="filter"> <th> <a href="http://<?php echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/shipping"; ?> " title="Reset"> <input type="button" class="btn small reset <?php echo $reset; ?> " value=""> </a></th> <th><input type="text" class="input-text" id="courier_name_search" onkeyup="searchQuery('courier_name')" onkeypress="return disableEnterKey(event)" <?php if ($_REQUEST['src'] == "courier_name") { echo "value=\"" . str_replace('\\', '/', $_REQUEST['srcval']) . "\""; } else { if (!empty($_REQUEST['src'])) { echo "disabled"; } }
} else { if (isset($_POST['btn-index-account'])) { header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/accounts"); } else { if (isset($_POST['btn_notification'])) { header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/notifications"); } else { if (isset($_POST['btn_payment'])) { header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/payment"); } else { if (isset($_POST['btn-order-confirm'])) { header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/order-detailing/" . $_POST['redirect_order_number']); } else { if (isset($_POST['btn-index-confirm'])) { if ($_POST['btn-index-confirm'] == "Submit") { header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/confirm-payment"); } } } } } } } } } } } } } } }
echo preg_replace("/\n/", "\n<br>", $recipeDetails['method']); ?> </p> <textarea class="hidden" rows="8"></textarea> </li> </ul> </div> </div><!--box--> </div><!--main-content--> </form> <script> function cancelDetail(){ location.href = "http://<?php echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/recipe"; ?> " } function recipeDetail(){ location.href = "http://<?php echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/recipe-edit/" . cleanurl($recipeDetails['alias']); ?> " } </script>
echo "<input type=\"hidden\" name=\"current_category\" id=\"current_category\" class=\"hidden\" value=\""; if ($cat == 'top') { echo 'top'; } else { echo $cat_name; } echo "\" /> \n"; echo "<input type=\"hidden\" name=\"query_per_page\" id=\"query_per_page\" class=\"hidden\" value=\"" . $query_per_page . "\" /> \n"; echo "<input type=\"hidden\" name=\"total_page\" id=\"total_page\" class=\"hidden\" value=\"" . $total_page . "\" /> \n"; echo "<input type=\"hidden\" name=\"sort_by\" id=\"sort_by\" class=\"hidden\" value=\"" . $sort_by . "\" /> \n"; echo "<input type=\"hidden\" name=\"search\" id=\"search\" class=\"hidden\" value=\"" . $search_parameter . "-" . $search_value . "\" /> \n"; if (isset($_POST['btn-add-recipes'])) { if ($_POST['btn-add-recipes'] == "GO") { $option = $_POST['listing-option']; $action = $_POST['listing-action']; $array = $_POST['array_recipe_id']; if ($option == "delete" and $action == "yes") { foreach ($array as $recipe_id) { deleteMultiple($recipe_id); ?> <script> location.href = "http://<?php echo $_SERVER['HTTP_HOST'], get_dirname($_SERVER['PHP_SELF']) . "/recipe"; ?> " </script> <?php } } } }
header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/filter-substrat"); } else { header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/filter-substrat-detail/" . $_POST['cat_id'] . "/" . cleanurl($_POST['category_name'])); } } else { if (isset($_POST['btn_sale_add'])) { header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/sale"); } else { if (isset($_POST['btn_about_lang'])) { header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/" . $_SESSION['lang_admin'] . "-about"); } else { if (isset($_POST['btn_custom_news_lang'])) { header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/" . $_SESSION['lang_admin'] . "-news-edit/" . $_POST['news_id'] . "/" . cleanurl($_POST['ct_post_news_title'])); } else { if (isset($_POST['btn_detail_news_category_lang'])) { header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/" . $_SESSION['lang_admin'] . "-news-category-detail/" . $_POST['hidden_category_id'] . "/" . cleanurl($_POST['hidden_category_name'])); } else { if (isset($_POST['btn_lang_detail_category'])) { header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/" . $_SESSION['lang_admin'] . "-detail-category/" . $_POST['hidden_category_id'] . "/" . cleanurl($_POST['category_name'])); } else { if (isset($_POST['btn_product_lang'])) { header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/" . $_SESSION['lang_admin'] . "-product-details-" . $_POST['product_alias']); } } } } } } } } }
/** * 文件解压 * * @param unknown_type $path * @param unknown_type $name * @param unknown_type $info * @return unknown */ public function unzip($path, $name, &$info = array()) { $path = $this->get_gpath($path, 'u'); $name = $this->get_gpath($name, 'x'); if (false == stripos($name, '.zip') || !is_file($path)) { $this->error = '文件系统错误,压缩文件不存在'; return false; } else { if (!is_writeable(get_dirname($path))) { $this->error = '文件系统错误,当前目录没有写入权限'; return false; } else { if (!is_readable($path)) { $this->error = '文件系统错误,目录文件没有访问权限'; return false; } } } $ifix = 0; $name = get_dirname($path) . '/' . substr(get_basename($name), 0, -4); $file = $name . '/'; while (file_exists($file) && 6 > $ifix++) { if (5 < $ifix) { $ifix = time(); } $file = "{$name}_X{$ifix}/"; } $this->load('PclZip'); $Zip = new PclZip($path); if (!$Zip->extract($file, false)) { $this->error = '文件系统错误,文件解压失败</br>Error : ' . $Zip->errorInfo(true); return false; } $info['dn'] = $info['fn'] = $info['si'] = $info['sc'] = 0; $list = $Zip->listContent() or array(); foreach ($list as $val) { if ($val['folder']) { $info['dn'] += 1; } else { $info['sc'] += $val['compressed_size']; $info['si'] += $val['size']; $info['fn'] += 1; } } $info['name'] = $this->get_upath(get_basename($file), 'x'); $info['si'] = get_deal_size($info['si']); $info['sc'] = get_deal_size($info['sc']); return true; }
<?php if ($_POST['btn_pop_category_lang'] == "") { unset($_SESSION['alert']); unset($_SESSION['msg']); } ?> <script> $("#pop-category").hide(); $("#btn-delete").hide(); function resetSort(){ location.href = "http://<?php echo $_SERVER['HTTP_HOST'], get_dirname($_SERVER['PHP_SELF']) . "/news-category"; ?> "; } function addPop(){ $("#pop-category").fadeIn("fast"); $("#pop-title").text("Add Category"); $("#news-category-active-status").attr('checked', 'checked'); $("#news-category-visible-status").attr('checked','checked'); } function closePop(){ $("#pop-category").fadeOut("fast"); $("#pop-title").val(''); $("#btn-delete").hide();
</li> <li class="field"> <label>Date <span>*</span></label> <p><?php echo $news_detail['news_created_date']; ?> </p> <input type="text" class="hidden input-text" style="width: 300px"> </li> <li class="field input-file clearfix"> <label>Cover Image</label> <div class="clearfix" style="width: 550px; padding-bottom: 8px"> <div class="fl image" style="width: 174px; height: 116px"> <div class="hidden"><div class="image-delete"></div><div class="image-overlay"></div></div> <img class="" src="http://<?php echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/../" . $news_detail['news_image']; ?> "> </div> </div> <p class="field-message hidden" style="padding-top: 10px">Recommended dimensions of 228 x 152 px.</p> </li> <li class="field-divider"></li> <li class="field"> <label>Content <span>*</span></label> <p><?php echo preg_replace("/\n/", "\n<br>", $news_detail['news_content']); ?> </p> <textarea class="hidden" rows="8"></textarea> </li>
} else { if (move_uploaded_file($userfile_tmp, $prod_img) && $file_error == 0) { } } } } return $filename; } /* # ---------------------------------------------------------------------- # DEFINED VARIABLE # ---------------------------------------------------------------------- */ $temp_url = 'http://' . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . '/'; $temp_curr = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $temp_img = 'http://' . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . '/admin/static/thimthumb.php?src=../'; /* --- ALERT SESSION --- */ if (!isset($_SESSION['alert']['type']) && !isset($_SESSION['alert']['msg'])) { $_SESSION['alert']['type'] = ''; $_SESSION['alert']['msg'] = ''; } if ($_SESSION['alert']['type'] != '' && $_SESSION['alert']['msg'] != '') { $_SESSION['alert']['type'] = $_SESSION['alert']['type']; $_SESSION['alert']['msg'] = $_SESSION['alert']['msg']; } else { $_SESSION['alert']['type'] = $_SESSION['alert']['type']; $_SESSION['alert']['msg'] = $_SESSION['alert']['msg']; } /* # ---------------------------------------------------------------------- # GET COUNTRY
$("#recipes-"+i).mouseleave(function(){ $("#remove-recipes-"+i).fadeOut("fast"); }); } function clearImage(i){ $("#upload-recipes-"+i).attr('src', ''); $("#upload-recipes-"+i).addClass("hidden"); $('#custom-recipe').html('<input type="file" name="upload_news_1" id="news-1" onchange="readURL(this,1)" class="hidden"/>'); $("#recipes-flag").val(''); } function cancelEdit(){ location.href = "http://<?php echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/" . $_REQUEST['lang'] . "-recipe-detail/" . $recipe_alias; ?> "; } function checkDefault(i){ var def_val = $('#id_normalization_'+i).val(); if($('#id_custom_lang_default_'+i).is(':checked')){ $('#value_'+i).val('default'); }else{ $('#value_'+i).val(def_val); } }
<td>M</td> <td>42”/106.7cm</td> <td>28.5”/72.4cm</td> <td>9.5”/24.1cm</td> </tr> <tr> <td>L</td> <td>44”/111.8cm</td> <td>29.5”/74.9cm</td> <td>10”/25.4cm</td> </tr> <tr> <td>XL</td> <td>47”/119cm</td> <td>30.5”/77.5cm</td> <td>10.5”/26.7cm</td> </tr> </tbody> </table> </div> </div><!--.modal-content --> </div><!--.modal-dialog --> </div><!--.modal --> <script src="<?php echo $prefix_url."script/add_bag.js"?>"></script> <!--WISHLIST--> <script src="<?php echo $prefix_url."script/add_wishlist.js"?>"></script> <div class="hidden" id="prefix_redirect">http://<?=$_SERVER['HTTP_HOST'];?><?php echo get_dirname($_SERVER['PHP_SELF']);?></div>
var categoryID = $('#category-id-edited-'+i).val(); var active = $('#category-active-edited-'+i).val(); var visibility = $('#category-visibility-edited-'+i).val(); var name = $('#category-name-edited-'+i).val(); $('#category-id-edited').val(categoryID); if(active == "Active" || active =="active"){ $('#category_active').attr('checked', 'checked'); }else if(active == "Inactive" || active == "inactive"){ $('#category_inactive').attr('checked', 'checked'); } if(visibility == "Visible" || visibility =="visible"){ $('#category_visible').attr('checked', 'checked'); }else if(visibility == "Invisible" || visibility == "invisible"){ $('#category_invisible').attr('checked', 'checked'); } $('#category-name-edited').val(name); } $('#page-option option[value=<?php echo $page?>]').attr('selected', 'selected'); $('#category_active_search option[value=<?php echo $search_value?>]').attr('selected', 'selected'); $('#category_visibility_search option[value=<?php echo $search_value?>]').attr('selected', 'selected'); function resetSearch(){ location.href = "http://<?php echo $_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])?>/recipe-category"; } </script> </form>
<?php // get dir function get_dirname($path) { $current_dir = dirname($path); if ($current_dir == "/" || $current_dir == "\\") { $current_dir = ''; } return $current_dir; } // Initialize the session. // If you are using session_name("something"), don't forget it now! //session_name("session_security_Session"); session_start(); // Unset all of the session variables. $_SESSION = array(); // If it's desired to kill the session, also delete the session cookie. // Note: This will destroy the session, and not just the session data! if (ini_get("session.use_cookies")) { $params = session_get_cookie_params(); setcookie(session_name('session_security_Session'), '', time() - 42000, $params["path"], $params["domain"], $params["secure"], $params["httponly"]); } // Finally, destroy the session. session_destroy(); header("Location: http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']));
</div> <div class="content col-xs-9"> <ul class="form-set"> <li class="form-group row underlined"> <label class="control-label col-xs-12">How To Use</label><br /><br /> <div class="col-xs-12"> <?php $path = get_dirname($_SERVER['PHP_SELF']); $CKEditor = new CKEditor(); $initialValue = 'How to use'; $code = $CKEditor->editor("how", $initialValue); ?> </div> </li> <li class="form-group row"> <label class="control-label col-xs-12">Technical Data</label><br /><br /> <div class="col-xs-12"> <?php $path = get_dirname($_SERVER['PHP_SELF']); $CKEditor = new CKEditor(); $initialValue = 'Technical Data'; $code = $CKEditor->editor("technical", $initialValue); ?> </div> </li> </ul> </div> </div><!--box-->
$full_order = count_city($search_query, $sort_by, $query_per_page); $total_query = $full_order['total_query']; $total_page = ceil($full_order['total_query'] / $query_per_page); // CALL FUNCTION $listing_order = get_city($search_query, $sort_by, $first_record, $query_per_page); // HANDLING ARROW SORTING if ($_REQUEST['srt'] == "category_name DESC") { $arr_order_number = "<span class=\"sort-arrow-up\"></span>"; } else { if ($_REQUEST['srt'] == "category_name") { $arr_order_number = "<span class=\"sort-arrow-down\"></span>"; } else { $arr_order_number = "<span class=\"sort-arrow-down\"></span>"; } } // STORED VALUE echo "<input type=\"hidden\" name=\"url\" id=\"url\" class=\"hidden\" value=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/career-city-view\">\n"; echo "<input type=\"hidden\" name=\"page\" id=\"page\" class=\"hidden\" value=\"" . $page . "\" /> \n"; echo "<input type=\"hidden\" name=\"query_per_page\" id=\"query_per_page\" class=\"hidden\" value=\"" . $query_per_page . "\" /> \n"; echo "<input type=\"hidden\" name=\"total_page\" id=\"total_page\" class=\"hidden\" value=\"" . ceil($full_order['total_query'] / $query_per_page) . "\" /> \n"; echo "<input type=\"hidden\" name=\"sort_by\" id=\"sort_by\" class=\"hidden\" value=\"" . $sort_by . "\" /> \n"; echo "<input type=\"hidden\" name=\"search\" id=\"search\" class=\"hidden\" value=\"" . $search_parameter . "-" . $search_value . "\" /> \n"; if (isset($_POST['btn_add_service_city'])) { // DEFINED VARIABLE $active = '1'; $visibility = $_POST['visibility_status']; $city_name = stripslashes($_POST['category_name']); insert($city_name, $active, $visibility); $_SESSION['alert'] = 'success'; $_SESSION['msg'] = 'Item has been successfully saved.'; }
/** * @todo pathinfo() * @param string $path * @return string */ function get_pathinfo($path) { $info = array('dirname' => get_dirname($path), 'basename' => get_basename($path), 'filename' => get_filename($path), 'extension' => get_fileext($path)); return $info; }
$('#category_visible').attr('checked', 'checked'); }else if(visibility == "Invisible" || visibility == "invisible"){ $('#category_invisible').attr('checked', 'checked'); } $('#category-name-edited').val(name); } $('#page-option option[value=<?php echo $page; ?> ]').attr('selected', 'selected'); $('#category_active_search option[value=<?php echo $search_value; ?> ]').attr('selected', 'selected'); $('#category_visibility_search option[value=<?php echo $search_value; ?> ]').attr('selected', 'selected'); function resetSearch(){ location.href = "http://<?php echo $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']); ?> /recipe-category"; } </script> </form>
}else if($_REQUEST['srt'] == "payment_status"){ $arr_payment_status = "<span class=\"sort-arrow-down\"></span>"; }else if($_REQUEST['srt'] == "fulfillment_status DESC"){ $arr_fulfillment_status = "<span class=\"sort-arrow-up\"></span>"; }else if($_REQUEST['srt'] == "fulfillment_status"){ $arr_fulfillment_status = "<span class=\"sort-arrow-down\"></span>"; } } /* --- STORED VALUE --- */ echo "<input type=\"text\" name=\"url\" id=\"url\" class=\"hidden\" value=\"http://".$_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])."/".$_link."-view\">\n"; echo "<input type=\"text\" name=\"url\" id=\"alternate-url\" class=\"hidden\" value=\"http://".$_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])."/order\">\n"; // Reset option echo "<input type=\"text\" name=\"page\" id=\"page\" class=\"hidden\" value=\"".$page."\" /> \n"; echo "<input type=\"text\" name=\"query_per_page\" id=\"query_per_page\" class=\"hidden\" value=\"".$query_per_page."\" /> \n"; echo "<input type=\"text\" name=\"total_page\" id=\"total_page\" class=\"hidden\" value=\"".$total_page."\" /> \n"; echo "<input type=\"text\" name=\"sort_by\" id=\"sort_by\" class=\"hidden\" value=\"".$sort_by."\" /> \n"; echo "<input type=\"text\" name=\"search\" id=\"search\" class=\"hidden\" value=\"".$search_parameter."-".$search_value."\" /> \n"; /* --- BUTTON RESET --- */ if(empty($_REQUEST['src'])){ $reset = "hidden"; }else{ $reset = ""; }
<?php /* * ---------------------------------------------------------------------- * REPORT - INVENTORY: VIEW * ---------------------------------------------------------------------- */ include "control.php"; include "export.php"; /* --- STORED VALUE --- */ echo '<input type="hidden" name="url" id="url" class="hidden" value="http://' . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . '/reporting/inventory">'; ?> <div class="subnav"> <div class="container clearfix"> <h1><span class="glyphicon glyphicon-tags"></span> Inventory Details</h1> <select class="form-control" id="category_name_search" onchange="selectCategoryInventory()"> <option value="top">All Category</option> <?php $_get->listCategory(0, 'top', $root); ?> </select> <div class="btn-placeholder"> <?php if ($date_start != '0000-00-00 00:00:00') { echo '<a href="' . BASE_URL . 'reporting/sales-by-category">'; echo '<input type="button" class="btn btn-danger btn-sm m_r_10" value="Reset">'; echo '</a>'; } //BASE_URL.'reports/exports/'.date('dm').' Inventory Details ('.$root_name.').xlsx'
{ $connected = @fsockopen("www.google.com", 80); //website, port (try 80 or 443) if ($connected) { $is_conn = true; //action when connected fclose($connected); } else { $is_conn = false; //action in connection failure } return $is_conn; } /* --- DEFINED VARIABLE (GLOBAL) --- */ $prefix_url = "http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/"; $prefix_img = "http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/admin/static/thimthumb.php?src=../"; // APPLIED FRONT END ONLY $act = $_REQUEST['act']; $current_url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; /* * ---------------------------------------------------------------------- * ADMIN LOGIN * ---------------------------------------------------------------------- */ /* --- CHECKING DATABASE --- */ function admin_login($one, $two) { $conn = connDB(); $sql = "SELECT count(*) as rows, `id` FROM tbl_admin where username = '******' and password = MD5('{$two}')"; $query = mysql_query($sql, $conn); $result = mysql_fetch_array($query);