From 92cc465a3c636fdbebaaede1fec919218ec11dc5 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Tue, 20 Sep 2011 16:04:35 +0000 Subject: [PATCH] // Creation of AdminController : Admin tabs will now extend this class (see AdminTools.php for example) git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8667 b9a71923-0436-4b27-9f14-aed3839534dd --- admin-dev/header.inc.php | 44 +- admin-dev/index.php | 26 +- admin-dev/tabs/AdminTools.php | 17 +- admin-dev/themes/default/admin.css | 82 ++++ admin-dev/themes/default/bg-lang.png | Bin 0 -> 1715 bytes admin-dev/themes/default/bg-quick.png | Bin 0 -> 1620 bytes admin-dev/themes/default/bg-submenu.png | Bin 0 -> 190 bytes admin-dev/themes/default/bg-subtab.png | Bin 0 -> 249 bytes admin-dev/themes/default/bg-tab.png | Bin 0 -> 968 bytes admin-dev/themes/default/bg-top.png | Bin 0 -> 9503 bytes admin-dev/themes/default/button-bg.png | Bin 0 -> 339 bytes admin-dev/themes/default/footer-bg.png | Bin 0 -> 946 bytes admin-dev/themes/default/header_module.png | Bin 0 -> 218 bytes admin-dev/themes/default/index.php | 36 ++ admin-dev/themes/default/news-bg.gif | Bin 0 -> 277 bytes admin-dev/themes/default/notif_customer.png | Bin 0 -> 555 bytes admin-dev/themes/default/notif_message.png | Bin 0 -> 258 bytes admin-dev/themes/default/notif_order.png | Bin 0 -> 577 bytes admin-dev/themes/default/searchbar.png | Bin 0 -> 2446 bytes admin-dev/themes/default/searchbutton.png | Bin 0 -> 930 bytes admin-dev/themes/default/separator_subnav.png | Bin 0 -> 120 bytes admin-dev/themes/default/tab_right.gif | Bin 0 -> 2128 bytes admin-dev/themes/default/thead.png | Bin 0 -> 218 bytes admin-dev/themes/template/adminTools.tpl | 34 ++ admin-dev/themes/template/footer.tpl | 47 ++ admin-dev/themes/template/header.tpl | 263 ++++++++++ admin-dev/themes/template/index.php | 36 ++ admin-dev/themes/template/invalid_token.tpl | 43 ++ classes/AdminController.php | 453 ++++++++++++++++++ classes/Tab.php | 12 + config/config.inc.php | 14 +- config/smartyadmin.config.inc.php | 150 ++++++ js/notifications.js | 105 ++++ 33 files changed, 1316 insertions(+), 46 deletions(-) create mode 100644 admin-dev/themes/default/admin.css create mode 100644 admin-dev/themes/default/bg-lang.png create mode 100644 admin-dev/themes/default/bg-quick.png create mode 100644 admin-dev/themes/default/bg-submenu.png create mode 100644 admin-dev/themes/default/bg-subtab.png create mode 100644 admin-dev/themes/default/bg-tab.png create mode 100644 admin-dev/themes/default/bg-top.png create mode 100644 admin-dev/themes/default/button-bg.png create mode 100644 admin-dev/themes/default/footer-bg.png create mode 100644 admin-dev/themes/default/header_module.png create mode 100644 admin-dev/themes/default/index.php create mode 100644 admin-dev/themes/default/news-bg.gif create mode 100644 admin-dev/themes/default/notif_customer.png create mode 100644 admin-dev/themes/default/notif_message.png create mode 100644 admin-dev/themes/default/notif_order.png create mode 100644 admin-dev/themes/default/searchbar.png create mode 100644 admin-dev/themes/default/searchbutton.png create mode 100644 admin-dev/themes/default/separator_subnav.png create mode 100644 admin-dev/themes/default/tab_right.gif create mode 100644 admin-dev/themes/default/thead.png create mode 100644 admin-dev/themes/template/adminTools.tpl create mode 100644 admin-dev/themes/template/footer.tpl create mode 100644 admin-dev/themes/template/header.tpl create mode 100644 admin-dev/themes/template/index.php create mode 100644 admin-dev/themes/template/invalid_token.tpl create mode 100644 classes/AdminController.php create mode 100644 config/smartyadmin.config.inc.php create mode 100644 js/notifications.js diff --git a/admin-dev/header.inc.php b/admin-dev/header.inc.php index 4fffaff5b..2fb4d5c7a 100644 --- a/admin-dev/header.inc.php +++ b/admin-dev/header.inc.php @@ -1,6 +1,6 @@ @@ -72,13 +70,13 @@ echo ' if (data) { json = jQuery.parseJSON(data); - + // Add orders notifications to the list html = ""; nb_notifs = 0; $.each(json.order, function(property, value) { html += "
  • '.translate('A new order has been made on your shop.').'
    '.translate('Order number : ').'#" + parseInt(value.id_order) + "
    '.translate('Total : ').'" + value.total_paid_real + "
    '.translate('From : ').'" + value.customer_name + "
    '.translate('Click here to see that order').'
  • "; - }); + }); if (html != "") { $("#list_orders_notif").prev("p").hide(); @@ -90,17 +88,17 @@ echo ' else { $("#orders_notif_number_wrapper").hide(); - } - + } + // Add customers notifications to the list html = ""; nb_notifs = 0; $.each(json.customer, function(property, value) { html += "
  • '.translate('A new customer registered on your shop.').'
    '.translate('Customer name : ').'" + value.customer_name + "
    '.translate('Click here to see that customer').'
  • "; - }); + }); if (html != "") { - $("#list_customers_notif").prev("p").hide(); + $("#list_customers_notif").prev("p").hide(); $("#list_customers_notif").empty().append(html); nb_notifs = $("#list_customers_notif li").length; $("#customers_notif_value").text(nb_notifs); @@ -110,7 +108,7 @@ echo ' { $("#customers_notif_number_wrapper").hide(); } - + // Add messages notifications to the list html = ""; nb_notifs = 0; @@ -119,7 +117,7 @@ echo ' }); if (html != "") { - $("#list_messages_notif").prev("p").hide(); + $("#list_messages_notif").prev("p").hide(); $("#list_messages_notif").empty().append(html); nb_notifs = $("#list_messages_notif li").length; $("#messages_notif_value").text(nb_notifs); @@ -129,12 +127,12 @@ echo ' { $("#messages_notif_number_wrapper").hide(); } - + } setTimeout("getPush()",60000); }); } - + $().ready(function() { var hints = $(\'.translatable span.hint\'); @@ -149,12 +147,12 @@ echo ' $youEditFieldFor = sprintf(translate('A modification of this field will be applied for the shop %s'), ''.Context::getContext()->shop->name.''); echo 'hints.html(hints.html()+\'
    '.addslashes($youEditFieldFor).'\');'; } - -echo ' var html = ""; + +echo ' var html = ""; var nb_notifs = 0; var wrapper_id = ""; var type = new Array(); - + $(".notifs").live("click", function(){ wrapper_id = $(this).attr("id"); type = wrapper_id.split("s_notif") @@ -164,16 +162,16 @@ echo ' var html = ""; if(!$("#" + wrapper_id + "_wrapper").is(":visible")) { $(".notifs_wrapper").hide(); - $("#" + wrapper_id + "_number_wrapper").hide(); - $("#" + wrapper_id + "_wrapper").show(); + $("#" + wrapper_id + "_number_wrapper").hide(); + $("#" + wrapper_id + "_wrapper").show(); }else { - $("#" + wrapper_id + "_wrapper").hide(); + $("#" + wrapper_id + "_wrapper").hide(); } - } + } }); }); - + $("#main").click(function(){ $(".notifs_wrapper").hide(); }); @@ -209,7 +207,7 @@ echo ' var html = ""; '; } - if (Configuration::get('PS_SHOW_NEW_MESSAGES') == 1) + if (Configuration::get('PS_SHOW_NEW_MESSAGES') == 1) { echo '
    0
    @@ -324,7 +322,7 @@ if (Context::getContext()->employee->bo_uimode == 'hover') echo '
    ' - .(file_exists(PS_ADMIN_DIR.'/../install') ? '
    ' + .(file_exists(_PS_ADMIN_DIR_.'/../install') ? '
    ' .translate('For security reasons, you must also:').' '. translate('delete the /install folder'). '
    ' : '').' diff --git a/admin-dev/index.php b/admin-dev/index.php index 9af8d30a1..7a5d0bcf5 100644 --- a/admin-dev/index.php +++ b/admin-dev/index.php @@ -26,11 +26,10 @@ */ define('_PS_ADMIN_DIR_', getcwd()); -define('PS_ADMIN_DIR', _PS_ADMIN_DIR_); // Retro-compatibility -include(PS_ADMIN_DIR.'/../config/config.inc.php'); -include(PS_ADMIN_DIR.'/functions.php'); -include(PS_ADMIN_DIR.'/header.inc.php'); +include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); +include(_PS_ADMIN_DIR_.'/functions.php'); +include(_PS_ADMIN_DIR_.'/init.php'); if (empty($tab) and !sizeof($_POST)) { $tab = 'AdminHome'; @@ -38,14 +37,22 @@ if (empty($tab) and !sizeof($_POST)) $_POST['token'] = Tools::getAdminTokenLite($tab); } - if ($adminObj = checkingTab($tab)) +if ($adminObj = checkingTab($tab)) +{ + // init is different for new tabs (AdminController) and old tabs (AdminTab) + if ($adminObj instanceof AdminController) { + $adminObj->path = dirname($_SERVER["PHP_SELF"]); + $adminObj->run(); + } + else + { + include(_PS_ADMIN_DIR_.'/header.inc.php'); $isoUser = Context::getContext()->language->id; $tabs = array(); $tabs = recursiveTab($adminObj->id, $tabs); $tabs = array_reverse($tabs); $bread = ''; - foreach ($tabs AS $key => $item) $bread .= ' > '.((sizeof($tabs) - 1 > $key) @@ -75,8 +82,8 @@ if (empty($tab) and !sizeof($_POST)) '.$bread; echo '
    '; - - + + if (Shop::isMultiShopActivated() && Context::shop() != Shop::CONTEXT_ALL) { echo '
    '; @@ -144,7 +151,8 @@ if (empty($tab) and !sizeof($_POST)) die; } } + include(_PS_ADMIN_DIR_.'/footer.inc.php'); } +} -include(PS_ADMIN_DIR.'/footer.inc.php'); diff --git a/admin-dev/tabs/AdminTools.php b/admin-dev/tabs/AdminTools.php index 2bcc86a33..2f01cabda 100644 --- a/admin-dev/tabs/AdminTools.php +++ b/admin-dev/tabs/AdminTools.php @@ -1,6 +1,6 @@ className = 'AdminTools'; + parent::__construct(); } - + public function display() { - echo '
    '.$this->l('Shop Tools').''; - echo '

    '.$this->l('Several tools are available to manage your shop.').'

    '; - echo '
    '; - echo '

    '.$this->l('Please choose a tool by selecting a Tools sub-tab above.').'

    '; - echo '
    '; + parent::display(); + $this->context->smarty->display('adminTools.tpl'); } } diff --git a/admin-dev/themes/default/admin.css b/admin-dev/themes/default/admin.css new file mode 100644 index 000000000..5f3da0854 --- /dev/null +++ b/admin-dev/themes/default/admin.css @@ -0,0 +1,82 @@ +body{background:#EFEFEF} +#top_container{margin:0;padding:0} +#header_infos{float:left;font-size:10px;margin:10px 20px 4px 0;width:380px;height:40px} +#header_infos #header_shopname span{display:block;font-size:24px;height:28px;overflow:hidden;margin-bottom:-8px} +#header_infos #header_logout{text-decoration:underline} +#header_infos #header_foaccess{text-decoration:none} +#header_search{float:right;height:39px;width:356px} +#header_search #bo_query{float:left;height:16px;line-height:16px;margin:8px 2px 0 30px;vertical-align:middle;width:140px} +#header_search #bo_search_type{float:left;height:21px;line-height:21px;margin:8px 2px 0 0;vertical-align:middle;width:90px} +#header_search #bo_search_submit{cursor:pointer;float:left;font-weight:700;margin:7px 0 0 2px;width:79px} +#header_quick{float:right;height:39px;margin-right:1px;width:175px} +#header_quick #quick_select{margin:8px 0 0 20px;vertical-align:middle;width:140px} +#header_shoplist{float: right;} +#header_myaccount{background:url(bg-lang.png) no-repeat;display:block;float:right;height:16px;margin:8px 1px 0 0;width:16px} +.button{background-color:#FFF6D3;border:1px solid #DFD5AF;border-left:1px solid #FFF6D3;border-top:1px solid #FFF6D3;color:#268CCD;padding:3px} +.button[disabled=disabled]{color:#8C8C8C} +input.button[disabled=disabled]:hover{background-color:#FFF6D3} +.button:hover{background-color:#F0EBD6} +.table{border:1px solid #DFD5C3;padding:0} +.table th a{text-decoration:underline} +.table a:hover{text-decoration:none} +.table tr th{background:#F4E6C9 url(news-bg.gif) repeat-x top left;padding:4px 6px} +.table tr td{border-bottom:1px solid #DEDEDE;color:#963;font-size:.9em;height:23px;padding:0 4px 0 6px} +.table tr.last td{border-bottom:none} +.alt_row{background-color:#EFEFEF} +.path_bar{background-color:#E2EBEE;border:1px solid #999999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:13px;margin-bottom:20px;padding:5px} +.path_bar a{font-weight:700} +.cat_bar{background-color:#F4E8CD;border:1px solid #999999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:12px;font-weight:700;margin-bottom:20px;padding:5px} +.cat_bar a{font-weight:700} +fieldset{background:#FFFFF0;border:1px solid #DFD5C3;font-size:1.1em;margin:0;padding:1em} +legend{background:#FFF6D3;border:1px solid #DFD5C3;font-weight:700;margin:0;padding:.2em .5em;text-align:left} +#menu{float:left;height:30px;line-height:normal;margin:10px 0 0;*margin:7px 0 0;padding:0;width:100%;padding:0 1px} +#menu li{background:url(bg-tab.png) repeat-x 0 -2px;float:left;height:29px;list-style:none;margin:0 1px 0 0;list-style:none;display:block;border:1px solid #999999;-moz-border-radius-topright:6px;-moz-border-radius-topleft:6px;-webkit-border-top-right-radius:6px;-webkit-border-top-left-radius:6px} +#menu li a{color:#000;display:block;height:20px;padding:8px 8px 4px 0;font-weight:bold;font-size:0.95em;} +#menu img{display:inline;padding:0 3px 0 6px;vertical-align:top;width:16px;height:16px} +#menu li.active,#menu li:hover{background-position:0 -38px;white-space:nowrap;} +#menu li.active a{color:#000} +#submenu{background:#ECEADE;clear:both;color:#666;margin:0;padding:0;border:1px solid #999999} +.withLeftBorder{background:transparent url(separator_subnav.png) no-repeat 0 5px} +#submenu li{display:inline;list-style:none;margin:0;background:transparent url(separator_subnav.png) no-repeat right 0;padding-left:7px;padding-right:7px;margin-top:8px;float:left;height:29px} +#submenu li a{text-decoration:underline} +#menu li{_height:32px;_padding-top:3px} +#menu li a{_display:inline;_padding:6px 5px 4px 0} +.tab-page {border:1px solid #ccc;background:#FFFFF0} +.tab-row .tab.selected {border:1px solid #ccc;background:#FFF6D3;margin:1px -3px -3px 0px;top:-2px} +.tab-row .tab {background:#EFEFEF} +hr {height: 1px;color:#E0D0B1;background-color:#E0D0B1} +#footer {height:40px;background:#ECEADE url(footer-bg.png) repeat-x scroll left bottom;border:1px solid #999999;font-size:12px;clear:both;font-size:0.9em;color:#666666} +#content {background-color:#FFF;border-left:1px solid #999999;border-right:1px solid #999999} +input[type="text"],input[type="password"],input[type="file"],textarea {border:1px solid #E0D0B1} +select {border: 1px solid #E0D0B1} +select[disabled="disabled"], input[disabled="disabled"],textarea[disabled="disabled"] {border: 1px solid #CCCCCC;color: #AAAAAA} +.header_module{background:url(header_module.png);padding-left: 0.5em;padding-top: 0.8em;height:20px;color: #812143;border:solid 1px #CCC;} +a.action_module{color: #268CCD;text-decoration: underline;} +a.header_module_toggle{font-weight: bold;color: #268CCD;display:block;} +a.module_toggle_all{color: #268CCD;} +.nbr_module{float:right;margin-right:10px;font-style:italic;font-size:12px;color: #268CCD;} + +.autoupgradeSteps div { line-height: 30px; } +.upgradestep { margin-right: 5px;padding-left: 10px; padding-right: 5px;} +#upgradeNow.stepok, .autoupgradeSteps a.stepok { background-image: url("../img/admin/enabled.gif");background-position: left center;background-repeat: no-repeat;padding-left: 15px;} +#upgradeNow {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;} +.button-autoupgrade {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;} +.processing {overflow: auto;} + +#header_infos {width: 445px;} +#header_shopname {float: left;width: 300px;} +#employee_links {float: left;clear: both;margin-top: 10px;} +#notifs_icon_wrapper {float: left;position: relative;margin-top: 8px;} +.notifs {float: left;position: relative; cursor: pointer;margin: 0px 5px;width: 18px;height: 15px;} +#orders_notif {background: url("notif_order.png") no-repeat left top;} +#customers_notif {background: url("notif_customer.png") no-repeat left top;} +#messages_notif {background: url("notif_message.png") no-repeat left top;} +.number_wrapper {color: white;display: none;font-size: 13px;font-weight: bold;position: absolute;right: -8px;top: -10px;z-index: 101;padding: 2px 5px;} +.number_wrapper span {background-color: #F03D25;display: block;padding: 0 2px;border-color: -moz-use-text-color #DD3822 #DD3822;border-radius: 2px 2px 2px 2px;border-right: 1px solid #DD3822;border-style: none solid solid;border-width: 0 0px;} +.notifs_wrapper {display: none;cursor:auto; position: absolute;top: 20px;left: 0;width:300px;background-color: white;border:2px solid #E0E0E0;padding: 10px;color: black;} +.notifs_wrapper h3 {font-size: 14px;padding-bottom:8px;margin:0;border-bottom: 2px solid #E0E0E0;} +.notifs_wrapper ul {padding:6px 0;margin:0;} +.notifs_wrapper ul li {text-decoration: none;list-style: none;font-size:12px;padding:5px 0;} +#header_infos .notifs_wrapper a {font-weight: bold;color: black;} +.notifs_wrapper p {font-size: 12px;padding-top:8px;margin:0;border-top: 2px solid #E0E0E0;} +.notifs_wrapper p.no_notifs {border: none;} \ No newline at end of file diff --git a/admin-dev/themes/default/bg-lang.png b/admin-dev/themes/default/bg-lang.png new file mode 100644 index 0000000000000000000000000000000000000000..a1f547194b30b56dec61ef34696e087bb7a2af0a GIT binary patch literal 1715 zcmeAS@N?(olHy`uVBq!ia0vp^>LAR)1|)kH2buyY$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%u1Od5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|80+w{G(j&jGsVi%$jQ~h(b>ew*~QJ!(8bNdz{J?a7%1p!WNBz( zW&+delAm0fo0?Yw)0=|OYl>4ZC@JI?0Bv?jEy^rQO>ryA&s6|>*(wu@TTD%yT-}T; z+;Ex))tiFFEfBqy1~~QV10ACeiddwGh6w>v4~Pj*wm=R%;iu*SQ+p9GSvN1Yj0ffx zbx#+^kcwMxrtkHZE|fU_UT=EFy(=cmwkTfYYn;UqrW@4Sq|n;p^_yKp@vKs#&s{6a z8B4j|K1fnb@oo=zwMMo}lEs(n;KG&7TVr`Pnrt+C_IK@lcd1)TqD;iA_`VT2ohPJ&6fh;q;?spESegWtTIv)6>CN6Yx5p#tI;lKI<#xwzIE1icKdE#y?Qjm zM5^t1y}bJbj*q1|y%E*__bPN9RbuB@w|MbmmSu|Z4{R$oHLP`-k|irI|9@SGR{tx5 zvuqhntGk%Q`Pz3E@0>I1+ljmT*U8Jse0lr+efMKa6nhi%NZq+~X;Nx=`FF?S zd#z52>`Tt-bZui}Vw`;cef^Hjn~Uc^-jTgTNG1O3D%F4|cLlqWN~@}V`EpBD8|I#U z{#nMPt|B${si4}#-2#-PtP=-6T)7gGke8>|!@qJ1ubx=< z%4g4?zgGin#SZ@w*i ze(l;c_qAcgGcNiaQ({`>udrP5-O0yRQw_K+#H`jRd92D}l9iRMmE~cZAFMBKGW9@o zR7Ka~Jxcke?e9&Bci**}ep*!Zd2W9G>-4m=d5qK4*I$;Lk;Jp3OjKJhL+IFbtylM~ z_$6*0J9ex{+Zd7bA!^0;?csHC7CZ~O zDs1f94leL9Xl`zPUsY8#<%3*z|J22f^@}EKUp;j~L$;=mcxI?C!_{SS-n(XJ9aow2 p>$u~k`qeDzpkx}u{VlkGk-@^yy|QWB-7lbO#M9N!Wt~$(69B)~nr;99 literal 0 HcmV?d00001 diff --git a/admin-dev/themes/default/bg-quick.png b/admin-dev/themes/default/bg-quick.png new file mode 100644 index 0000000000000000000000000000000000000000..4acbb75b44b2a4c948a7b943fe8b2318af9f29c0 GIT binary patch literal 1620 zcmaJ>eM}Q)7(Y>g>G+s)6%fsNpd*vE*A`mZaWH79Rz0i*CSlrHdIwZ#uiTyVBhCPu zaY&fDxf;c($nYb?GKD}?e5LvWIL*hUJMr7ikLa)ij zRk#MT-$QWY_=@8*eshv|Df*%*3;G1_XL^{(A`2 zVF>8KKv5+n{rb6~a>7Q&#A$KeU0L?Tfn$cK3_7v^($d^S%c5%4823{EbH ziAG{s5|vCo8H@1{D2Jwv5-!(dGI2}-4nbyfd1A5Ht-IZcF`lt3onCnhEF#k?qCl!q%L zv|IJKf%b5**W9FOx$aTW8=1&5oYdvxn4Bc^;6%w1-SoL6POCS`#iq|iIxUyWB*S%I z?7uGBbHq%Kdpk9@j59U(xPh5=k{Rn|e!k5B;B{FcOGq_$4wUh7Le_;gAF;MYg@_ZW zW!`O9da$CU!5_`cn!BVA!UQK{ik0gV&d&OhlUyIZLs=xX?F;oE+*5w*TdI0dZDmG? zDgvqS4u2Wnrjn$cH2ZW1jGbI-eERg+aF-Mv9UWcbT`=5tVDAk0y*&#)Py-+r@L2CX z^%%82(r+BXSdyM-(36RonfzyR~PQSBwGIUsxL}b zf441ee3y;L84Be7bh>fFosyCgul=?got>Q>EiEm684LO{)SZjNt2#FS+)t1ESlNr; z${h(kJ(p%ba=FOz53BUMj$ID*_o=y+d+ovF3+vOKlpl-8sOmVlTVAm_V*c~u&wp^h zr7kVKeP`LqaPo=u6Y8cTB_-t=#^*f`{dF)uxcKTo{@<5sYHD)9Ku2@w%%Has&HTLj zy1IM$=La8@t}Ys5)sM4}uBhs0VX;_oM-Cm@XS3O485iZvn|fN$U%YrYS6H@tBj>kI z4;%=lD%#ALuxz|5dBY-RwYLjfeQG&D*^dv(Uj*ESN-NSMQ!e7vor0;Bcn<2#*zCD^NQ>?w)aPHsJCCEK|0ik@4ZTw!Z-b XI~MnDAWy6jy5D(4QnJjRxT)wL7Fu^= literal 0 HcmV?d00001 diff --git a/admin-dev/themes/default/bg-submenu.png b/admin-dev/themes/default/bg-submenu.png new file mode 100644 index 0000000000000000000000000000000000000000..ba30c6b36a23059550bb97316aecb1cbeb933019 GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^j6kf;!3HGHJy2Q%5-1LGcVbv~PUa<$!;&U>c zv7h@-A}f&3S>O>_%)r2R2!t6$HM|;tf|4b!5hcO-X(i=}MX3w{iJ5sNdVa1U3T4K6 zrh2BHU4I?`73q1pIEF}sC-10xdZWH=d;a}@=}8Ps93TJxuTK$^68DugJIY}==h?(O e4YTi!M;Hp`I(U?&+O7lYWbkzLb6Mw<&;$V4f;hPV literal 0 HcmV?d00001 diff --git a/admin-dev/themes/default/bg-subtab.png b/admin-dev/themes/default/bg-subtab.png new file mode 100644 index 0000000000000000000000000000000000000000..fdc1b1180b124baa5efc8cbe4107abd12c36a3cd GIT binary patch literal 249 zcmeAS@N?(olHy`uVBq!ia0vp^j6kf$!3HE*_k3gr2^0spJ29*~C-V}>VM%xNb!1@J z*w6hZkrl}2EbxddW?z8@)#y;M1`rPy!NHKF5$ p9>*k-?w5OJ`)Vv*l6(6Hv#DUaw%$~ew?Io7JYD@<);T3K0RVAvR^#e%!Ly98$mw!wqz;vqNBd;i1x>2_83 zshR0hXR4=qK1@xVx~d#H3JD4n6coCGyo}~QwEpK)NU;AR(|+6iKY;eol#_yL_(691 zZvbZ}sUisl)trL*ZUGMk1q-FFtPNmgWo2VyzjktZoW5;j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})XKj& zmtrBLDNVDGMvha4`v=915z9knkB8Z~UX&cOu#4mlGqWYDqZjtuuJ@Ud)CJcyy_fNK z5af>T_~BcMFN@4Ck1XY3o!jGD@*?9aGsVo7Ouqx@tsIV*b1`6049%~XyA-RIBvwHn z0u@>j4AtKj-L7Ow&>1QzMJ z>ev9x*L@K>KDvQmo(ZzW0sV%70f`KM8);jTVJP?HO)M3v&c-cJPU^tesGArP^m~sf z%FP77ZtyhhK#kj9#VhS+nBb)Q@lqP>P>$Es{$Y1Y`SZs@x#uCk08+U=l>7MP$gE`4 zlV5I#9qC2&f**olBIl@d%?#M2LEOfc(c(UEM*Xfou-UDfUc^r1#hYgjw=(=H$VOH} zK->N9sv{qnXH@G6$3Tz0Ivs1Io+#BH;PE+Almjp`quu( zyw~tgp(!q%W1Mr@6!}->uEqs`V3_+*HIf|c zD6O7@L{XJ`HrP?WG3cnQHVd0W1u=ZvxAWdmHTov4ncpV2t|5C6fx|3qwgcS;C+RoFW&6tR&6}w^&cVSzm>iJmwEla0)v153EUEzj)y!)fvyE#p8m_& n`Cslo_>b!|KKK#^`U|r{J>|Mz@<{RDe-Q&U>c zv7h@-A}f&3S>O>_%)r2R7=#&*=dVZs3QCr^MwA5SrJ~QNf6c!~W8IcR ztrPDvyZ&ju;9KX@XZt!YUFqCm6Je^P7P{KW=Kao<6?#^zo%z8-myt)U}I|@caU|5Dg z^^rS=fga;5@Q5sCVBk9h!i=ICUJXD&$r9IylHmNblJdl&REB`W%)AmkKi3e2GGjec zJyXxFKM#P4ls#P>LnOkJAEYVp?3A#Ow2-*5a6)h6)W+6ENv@d^5|R@b7_8YDWyCl8 RN&=NLc)I$ztaD0e0ss{$Ok4l} literal 0 HcmV?d00001 diff --git a/admin-dev/themes/default/header_module.png b/admin-dev/themes/default/header_module.png new file mode 100644 index 0000000000000000000000000000000000000000..afaaae61d4d983c6dcd2ea2841c06d5378b72ba7 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfx!3HGlw@oMq2^0spJ29*~C-V}>VM%xNb!1@J z*w6hZkrl}2EbxddW?h6dRZUsYuk3v3k z+J&Dx=qP+-b=+gY{X|JH-61CA(a+2U5@C--JeXW;oYfe*Pfj|TbXk55&{PIbS3j3^ HP6 +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/admin-dev/themes/default/news-bg.gif b/admin-dev/themes/default/news-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..9adbd05e57a61884b5c5b164bd9c691987f2633a GIT binary patch literal 277 zcmV+w0qXuoNk%w1VK)FB0J8u9^ybO*=gal%)b!}h_3F{}>(lh;%=G5U_36;{>Cg4+ z()H=i_3F^|?A7$?&h+QXA^8LW00000EC2ui05<>~000ESu*pfQy*O*ZyZ>M)j$~<` z=vS<4>%MR-&vb3yuA=XJ@BhG{kU%UNkI1BQ$!t2G&?93?ty-_xtagj&dcWYXcuX!Q z&gisy&2GEji@1DFuiNkVykpPr`~QG}f`bEvhKGoWii?bmj*pO$hz69EmY0~Bnwy-R zo}ZwX0i&d)rl+W>s;jK6uCK7MvaJubwzs&sy1Tr+2fx6dFX%FDt4&d<=% b($mz{*4NnC+S}aS-rwNi;^XAy(GdVU);y|O literal 0 HcmV?d00001 diff --git a/admin-dev/themes/default/notif_customer.png b/admin-dev/themes/default/notif_customer.png new file mode 100644 index 0000000000000000000000000000000000000000..8a48039e79002dd4569ef2cc78f9a32c326e3ba8 GIT binary patch literal 555 zcmV+`0@VG9P);8a?z}B^D6Sc5qt2S$S*W!r}0t*XzAzS@ssV;W+NH*=(-5 z3Z>I&#V`zk=8zGA(3WYM`+y9rLP+)bd<9n_S(YtDQGWR!jYey9Es>QN3WZXxLYk(T z09mp|P&bL@P(yY$n?+oOVzJn~QmI(W*2?Ab6xq_5+uv%gLWx9TP%4!kmh6&hwR#Z@ z2Hzac@Aqq|RI2q?v8UZ`x3y%=s@LnC;cz%}xL&XKfv(9vGIxrI%b3J;?D2RG7K=rQ zwuT0n$z+nv<#I$21c#sE>^+uuK#M693VT=_A+QUG2(omCs7?{Ioy6mDlFepqdrrvU zdH#xvL?X`+*u-H0VBDU7Esi@x27>|V_xmK1$$W|1|3JnYJc1(m$FRlFev;4Ujcw#^4|BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrH1%E%9`545_%4^ymM7duCGx?jFPJYir6Kye7E(z29hIs;ir; zDLiR`f+XKVmPaB2&7EBP9xa;YSid4w;P402j+s$xwNB2pP|RA_DVUUNKfamlnupS@w!q!P70Ll6OX|1D7LL&H|_G#vKAHUK*}! zJj;G0C*Ye&MqQPU-IqKkiPnb)mfq|J}c9Qbq21SN#K=(3uy85}Sb4q9e E0RClL_W%F@ literal 0 HcmV?d00001 diff --git a/admin-dev/themes/default/notif_order.png b/admin-dev/themes/default/notif_order.png new file mode 100644 index 0000000000000000000000000000000000000000..e72645c99ca1ff823b480cd2af5e7d4187fde803 GIT binary patch literal 577 zcmV-H0>1r;P)4u*Y0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUz<4Ht8RCwBAoH=vme+CHn3&dGKJd1%0 zz@(|E$pFG^Y;4Tj+}x#5aS0%{1Y%<-n;>AZwY3Gi;McETi4Pt;Py#YJSy@@9{{H}T&fU9rtvEP1Jd~A{m9AdBif$<<)P)R4 zGzk0yVj(6NPew*&AtNIr1JHX3($dlgi47YT78a(ov@`~|K|(@8YsAIH|Nr>$!%9Ix zVJ;UJ7f}WQE&dPm)knBNK+Zd$K@Y!v{VD>IkdTo0L5xA1oSfglv4$)NG-xA;78Dc= z6%!LXM~p$hF#UjG5XehBJUk4*unGYhx)kVtf(G&O@;(NK6|x}EOPAHv)xX@kch3lD zUa35ii#e(dGn^%(xpqcGBY#ZVPaxp#$}M9p<(&j zwQDzHxCjK~<>lwxx^>G7m>^a0c?oFAzyJULe}pFkEYZ0mARyq>xpU_v|NZ;NXk=vc z3g{|Weq?z1^eOk9J9mT(3=AIf^YcGAefl)So4`zq%|a(2-V3$a@9*Ego8g(0iRnGi z0s&y&+zAXn54bosQyd%|B!Kx1lxi7FOiYxJ<$&o6oKiJ3G^CNm0RjvF-64>#(d^^g P00000NkvXXu0mjf17Z0+ literal 0 HcmV?d00001 diff --git a/admin-dev/themes/default/searchbar.png b/admin-dev/themes/default/searchbar.png new file mode 100644 index 0000000000000000000000000000000000000000..26b93aeefd2aaa58bf0bff6e41ad2f05ff1b92f1 GIT binary patch literal 2446 zcmaJ@X;>3k7JU%~8%0rBMJ0pCCRsrtkpKc=HLL+?7uqZZL`*6qg@mPOXk?>pz*d*3^Czn9?Y?xdo; zQ5gWB;^OS!4FHCVjty5TqHoK~WIyzyjnMrOA2<*RXNe%Nn+vlctP7tN1bIU&ZbWD^ zWCehN9*^md_%rrUIWQm3TEyTbd?CsPz{*A?a5k zLeu*zDSw71)*co?*d2Hxjzio@#O@^FNoM9278a&hGLb|i5Xl4*8Ar09nvtnQBKGs6 zhei`|1F7B)j-O+pGn!s7f(WSuLU?#MKHLlsi-HIw3Wc($K_=r+1Wp_wKv)u-K)iKH z!2uF;L_8tFg9X?{MHU+lLuh(vrhk>d7k-fyh(B)=x?uzfOGqH$iHjvI0U3<{59RZ} zpv8zc^mo4hQ&`N55JCiRNDPOGIOxFzZe0u|q}q!h76OZyFnnZb7d?Yv1QrLwLae>d z4lIMk;RzP!pYRL@)kPpiSON~@;y}|w74SSBmr5bq(Jgn|TiV$>IFd*Xj+R7oGY2zt zkxr(N%y*hEaUEbz7#|WKOI+^XT*_Cui&o$Z(Z~*vh<6m?I*MRE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8|>p3_N`JwcDD(tgNi={{DV-c7o&8Ybh9T?0^S$@5#x4g;42}N{YF;xuDel z?Sm|uj*I?!ol^fJ=cNL)*-Xk6BHr2kVP${TWRT&dman0q!4*J<-su2r^6+Y|ONyv& z>W7?-uVapEm`yL$)CTF=LDx)MPp_D~dqPQfisNMD!-&4S@44S{00`c`Pr7=0+s@wE z{_EzZfRfqS($dnk^HtkXZ?Vf|^P%qXkv*CKw4KbRGU!DKWS>gWpzFz#1+iOB>|ghx z4FB8I{H1dEc`V_a^R@Im$SB!Y9(pX_T>&r~53b1XFs|qo#BjO#^dS=!o4l>H_0x65 z%WnNsH@z_`p$Ku7NHO5(X@!4F2d;V6KwiYL{^QZ-i1NK4?xW&O8bAv|doJ2#<80A8 h720L*gpBH96ahsy!^(ACQvBi#$%XFjP;7VT_@5vG2`m5r literal 0 HcmV?d00001 diff --git a/admin-dev/themes/default/searchbutton.png b/admin-dev/themes/default/searchbutton.png new file mode 100644 index 0000000000000000000000000000000000000000..31327bf89451c57b37f3cc2838285c5730da83e1 GIT binary patch literal 930 zcmV;T16}-yP)N2bPDNB8 zb~7$DE;UJt{NMlp10P95K~!i%?c2*w6Hycf@L558Y*~O1)0m-!&_YCoR2m=+E}F3L z58!WAK^`s7Lf<@91PY3YPogoO=bOkS(;_`_eHLGubUK?~&b{Z(oYafQ<47bD=#NJc z>FYpG>@K>ZZI%WDy3oguM&SECB9REZWHO1q!TazZwWGH28po9!&i7U<4F+_f51ssh zdx*ti@Px|SUR%cb?h4L!mT|hBwKN#eg+6qmSAW8X7ai)v-sU_$%7qiT!E&=sT%vtBbeP2tdqUUc)=96s!<;JBK#C=KXEw*c>Kdl^U7C5zI4UJj3C z_`bYkQ5w+8;niz79F`X?N&|X1ypw7UZ%Ydnr2)Mh-f<<1H^l{u(tutL@2H%`eqr9C zG@zHmW3$-b5vw z9D9tZsVSt>X?Qlb)y=3|&TYR|CxPNPP_Q%^hzotLo!cV+7wkYjtCl7My0ECkDKxkJ zeu=d&7cDm%h!wru+%`}qTE)`RfKKA&=C;8NyB4*9c)4d=Y#N*zjzuP3S9n~uR(W~@ z@w&ph?6h`7(H+yoD_nU7r-P$YQ{|Q9ON-7RRC#iGzNlHW27C&;TDDS(KLyXCGvJd( zsA2pTO^eQek7%LFyO2%LqB96ro-~SYa%#5d4A@v*<#D6@C8uVK&VXJayf2jrSab$W zc%RGTu;>gN9_NpILrSh4Gr-n3K9w_;76yc)S7>g_{f-xc>RWqm zX*3WQ`q1gxxov%GCRo1wktJ+E7y8)T_CNj-d)?gj51Usjj?Zhf!2kdN07*qoM6N<$ Ef)>@THUIzs literal 0 HcmV?d00001 diff --git a/admin-dev/themes/default/separator_subnav.png b/admin-dev/themes/default/separator_subnav.png new file mode 100644 index 0000000000000000000000000000000000000000..0d2a18ad086ee123a9befdd528beaa7b35df93b7 GIT binary patch literal 120 zcmeAS@N?(olHy`uVBq!ia0vp^Oh7Ec!3HFkTfSKYq$EpRBT9nv(@M${i&7aJQ}UBi z6+Ckj(^G>|6H_V+Po~-c6-jxzIEGZ*O8WQze|^)02@@EFnMHW&*c=)d8CGjBzqPsc RL^YHHF=I!wA?BVR{-s0=--RJE8<&@gy z>eu7w|KNhu;phL}dH>vU|J!W;*kS+HTmRHi|I$kT(MJEzK>yA>|I9O)nVJ9p{{R30 z000000000000000A^8LW2LKuXEC2ui0IUE&0RRR6U?z@aX`X1Ru59bRaNKHi4cvIH z?|kq7z@TtQEErluh^{imRxSX;IJ4+)dbGyw0g~MyWjA*d`_?1 z?bN$|&+q&HetCd{goTEOY8i-&jE#>vn(6Y_Z)YaD0*4f&~83o?o z;NjxqT^!4`j@b~)r{Qdsm`ThwUNU-3y3sneBDqe_)IwW?F5R+7m zCEB)dC%%nK*Wui{coW{uTX!$txPJe(4J=qK;lgGQBNnT8vDe0qwL*?;bu#6tmM=%m ztodqZ!JI!Q4K3Oz>C!|`qXw#abx+rHTf@F7dv?v*w!h|Pi+i_F-)VaTcRReS@Zu(q zBNwTB`BCSRp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&(jOHveAc1OH^P1SqrZ%_9&2D=0o8SzmILArOa#FLL=uD?N*U8RyvNHn{h^IW~ zNzZ!P^Pc$3r#|<|&wl#zp8yRgJOfJ5f*SOo2u&zLGeCicI`p9sji^K?O3{j1^r9He zs75!+(T+0zw4)#msYpjk(vp%i0~JWAN>|F#mb&z%Fpa59XG+tW+VrM4%_&NA%F~|u z^rt`#Do`_Efub7qs7Ot!QkTlqraJYhP>rfor%KhTX5a!?&8k+n%GIuV^{ZeFt60ZM z*0P%QtZ2;u2G+{fwz~DLaE+^6=StVQ+V!q@&8uGbs@A>w^{;>ptY8N#*uE0>u!v2p zVi((1!!q`W!w1q{jYF7)`(z5oo zux)H?XG>ek*7mlrbuDgp%URv>_P3MuEpUg+Sm6@)xQ8_^a+lj$<~nz=%6+bM>l)qZ zS{JU()xEBE*P7k!Ubnm6oi2F8``q!8m$~LWFLKkXUgEO1y}*4he0eM1`Qo;|_N^^` z^E=!9@;A5tC9i)2yxIX17_|mIuxS&lV9_$T!Jmb&bssF@%u=|*m%T8CgS%npYPiFs z1@Uq}EMn-E__!oKF=A7!V#2bx#i@lcePujj8sFE(H^#Akb-ZI9_t(ci1~Pz!{Mr{2 znXX1YvRsp_Wb8IswM>4pY^A(lDp%Rc4#skpwH#qCcQ(pa1~Zk#EM+o3+00Ewvyw9q G0suR2Xq&nK literal 0 HcmV?d00001 diff --git a/admin-dev/themes/default/thead.png b/admin-dev/themes/default/thead.png new file mode 100644 index 0000000000000000000000000000000000000000..afaaae61d4d983c6dcd2ea2841c06d5378b72ba7 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfx!3HGlw@oMq2^0spJ29*~C-V}>VM%xNb!1@J z*w6hZkrl}2EbxddW?h6dRZUsYuk3v3k z+J&Dx=qP+-b=+gY{X|JH-61CA(a+2U5@C--JeXW;oYfe*Pfj|TbXk55&{PIbS3j3^ HP6 +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{include file='header.tpl'} +
    + {l s='Shop Tools'} +

    {l s='Several tools are available to manage your shop.'}

    +
    +

    {l s='Please choose a tool by selecting a Tools sub-tab above.'}

    +
    +{include file='footer.tpl'} \ No newline at end of file diff --git a/admin-dev/themes/template/footer.tpl b/admin-dev/themes/template/footer.tpl new file mode 100644 index 000000000..3e7579ff9 --- /dev/null +++ b/admin-dev/themes/template/footer.tpl @@ -0,0 +1,47 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
    +
    + {$HOOK_FOOTER} + +
    +
    + + diff --git a/admin-dev/themes/template/header.tpl b/admin-dev/themes/template/header.tpl new file mode 100644 index 000000000..eccf341d9 --- /dev/null +++ b/admin-dev/themes/template/header.tpl @@ -0,0 +1,263 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + + + + PrestaShop™ - {l s='Administration panel'|escape:'htmlall':'UTF-8'} + + + {if isset($css_files)} + {foreach from=$css_files key=css_uri item=media} + + {/foreach} + {/if} + {if isset($js_files)} + {foreach from=$js_files item=js_uri} + + {/foreach} + {/if} + + + + {$HOOK_HEADER} + + + + + {if $is_multishop} + + {/if} +
    +
    +
    + {$shop_name}
    + {if {$show_new_orders} == 1} +
    + + 0 + +
    +

    {l s='Last orders'}

    +

    {l s='No new orders has been made on your shop'}

    +
      +

      {l s='Show all orders'}

      +
      +
      + {/if} + {if ($show_new_customers == 1)} +
      + + 0 + +
      +

      {l s='Last customers'}

      +

      {l s='No new customers registered on your shop'}

      +
        +

        {l s='Show all customers'}

        +
        +
        + {/if} + {if {$show_new_messages} == 1} +
        + + 0 + +
        +

        {l s='Last messages'}

        +

        {l s='No new messages posted on your shop'}

        +
          +

          {l s='Show all messages'}

          +
          +
          + {/if} +
          + + {$first_name} {$last_name} + [ + {l s='logout'} + ] + {if {$base_url}} + - {l s='View my shop'} + {/if} + - {l s='My preferences'} +
          + +
          + + +
          + + {if $multi_shop} +
          {l s='Select your shop:'}{$shop_list}
          + {/if} +
           
          + {$HOOK_TOP} + + {foreach $tabs AS $t} + + {/foreach} + {if $employee->bo_uimode == 'hover'} + + {/if} + +
          +
          + {if $install_dir_exists} +
          + {l s='For security reasons, you must also:'} {l s='delete the /install folder'} +
          + {/if} + +
          + + {l s='Back Office'} + {foreach $tabs_breadcrumb AS $item} + > + {if isset($item.token)}{/if} + {$item.name} + {if isset($item.token)}{/if} + {/foreach} +
          + {if $is_multishop} +
          + {if $shop_context == 'group'} + {l s='You are configuring your store for group shop '}{$shop_name} + {elseif $shop_context == 'shop'} + {l s='You are configuring your store for shop '}{$shop_name} + {/if} +
          + {/if} diff --git a/admin-dev/themes/template/index.php b/admin-dev/themes/template/index.php new file mode 100644 index 000000000..dce6b30f5 --- /dev/null +++ b/admin-dev/themes/template/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/admin-dev/themes/template/invalid_token.tpl b/admin-dev/themes/template/invalid_token.tpl new file mode 100644 index 000000000..b4fdb930e --- /dev/null +++ b/admin-dev/themes/template/invalid_token.tpl @@ -0,0 +1,43 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + {l s='Invalid security token'} + + +
          + + {l s='Invalid security token'} +
          + + + + + + + + \ No newline at end of file diff --git a/classes/AdminController.php b/classes/AdminController.php new file mode 100644 index 000000000..d67694c51 --- /dev/null +++ b/classes/AdminController.php @@ -0,0 +1,453 @@ +id = Tab::getIdFromClassName($this->className); + $this->_conf = array( + 1 => $this->l('Deletion successful'), 2 => $this->l('Selection successfully deleted'), + 3 => $this->l('Creation successful'), 4 => $this->l('Update successful'), + 5 => $this->l('Status update successful'), 6 => $this->l('Settings update successful'), + 7 => $this->l('Image successfully deleted'), 8 => $this->l('Module downloaded successfully'), + 9 => $this->l('Thumbnails successfully regenerated'), 10 => $this->l('Message sent to the customer'), + 11 => $this->l('Comment added'), 12 => $this->l('Module installed successfully'), + 13 => $this->l('Module uninstalled successfully'), 14 => $this->l('Language successfully copied'), + 15 => $this->l('Translations successfully added'), 16 => $this->l('Module transplanted successfully to hook'), + 17 => $this->l('Module removed successfully from hook'), 18 => $this->l('Upload successful'), + 19 => $this->l('Duplication completed successfully'), 20 => $this->l('Translation added successfully but the language has not been created'), + 21 => $this->l('Module reset successfully'), 22 => $this->l('Module deleted successfully'), + 23 => $this->l('Localization pack imported successfully'), 24 => $this->l('Refund Successful'), + 25 => $this->l('Images successfully moved'), + ); + if (!$this->identifier) $this->identifier = 'id_'.$this->table; + if (!$this->_defaultOrderBy) $this->_defaultOrderBy = $this->identifier; + $className = get_class($this); + if ($className == 'AdminCategories' OR $className == 'AdminProducts') + $className = 'AdminCatalog'; + $this->token = Tools::getAdminToken($className.(int)$this->id.(int)$this->context->employee->id); + + if (!Shop::isMultiShopActivated()) + $this->shopLinkType = ''; + } + + /** + * Check rights to view the current tab + * + * @return boolean + */ + public function viewAccess($disable = false) + { + if ($disable) + return true; + $this->tabAccess = Profile::getProfileAccess($this->context->employee->id_profile, $this->id); + + if ($this->tabAccess['view'] === '1') + return true; + return false; + } + + /** + * Check for security token + */ + public function checkToken() + { + $token = Tools::getValue('token'); + return (!empty($token) AND $token === $this->token); + } + + public function run() + { + $this->checkAccess(); + $this->init(); + $this->postProcess(); + $this->setMedia(); + $this->initHeader(); + $this->initFooter(); + //$adminObj->displayConf(); + //$adminObj->displayErrors(); + $this->display(); + } + + /** + * Check if the token is valid, else display a warning page + */ + public function checkAccess() + { + if (!$this->checkToken()) + { + // If this is an XSS attempt, then we should only display a simple, secure page + // ${1} in the replacement string of the regexp is required, because the token may begin with a number and mix up with it (e.g. $17) + $url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$this->token.'$2', $_SERVER['REQUEST_URI']); + if (false === strpos($url, '?token=') AND false === strpos($url, '&token=')) + $url .= '&token='.$this->token; + + $this->context->smarty->assign('url', htmlentities($url)); + $this->context->smarty->display(_PS_ADMIN_DIR_.'/themes/invalid_token.tpl'); + die; + } + } + + public function display() + { + + } + + /** + * Assign smarty variables for the header + */ + public function initHeader() + { + // Shop context + if (Shop::isMultiShopActivated()) + { + if (Context::shop() == Shop::CONTEXT_ALL) + $shop_context = 'all'; + elseif (Context::shop() == Shop::CONTEXT_GROUP) + { + $shop_context = 'group'; + $shop_name = $this->context->shop->getGroup()->name; + } + else + { + $shop_context = 'shop'; + $shop_name = $this->context->shop->name; + } + $this->context->smarty->assign(array( + 'shop_name' => $shop_name, + 'shop_context' => $shop_context, + )); + $youEditFieldFor = sprintf($this->l('A modification of this field will be applied for the shop %s'), ''.Context::getContext()->shop->name.''); + } + + // Multishop + $is_multishop = Shop::isMultiShopActivated();// && Context::shop() != Shop::CONTEXT_ALL; + /*if ($is_multishop) + { + if (Context::shop() == Shop::CONTEXT_GROUP) + { + $shop_context = 'group'; + $shop_name = $this->context->shop->getGroup()->name; + } + elseif (Context::shop() == Shop::CONTEXT_SHOP) + { + $shop_context = 'shop'; + $shop_name = $this->context->shop->name; + }*/ + + + + // Quick access + $quick_access = QuickAccess::getQuickAccesses($this->context->language->id); + foreach ($quick_access AS $index => $quick) + { + preg_match('/tab=(.+)(&.+)?$/', $quick['link'], $adminTab); + if (isset($adminTab[1])) + { + if (strpos($adminTab[1], '&')) + $adminTab[1] = substr($adminTab[1], 0, strpos($adminTab[1], '&')); + $quick_access[$index]['link'] .= '&token='.Tools::getAdminToken($adminTab[1].(int)(Tab::getIdFromClassName($adminTab[1])).(int)($this->context->employee->id)); + } + } + + // Tab list + $tabs = Tab::getTabs($this->context->language->id, 0); + foreach ($tabs AS $index => $tab) + { + if (Tab::checkTabRights($tab['id_tab']) === true) + { + $img_exists_cache = Tools::file_exists_cache(_PS_ADMIN_DIR_.'/themes/'.$this->context->employee->bo_theme.'/img/t/'.$tab['class_name'].'.gif'); + $img = ($img_exists_cache ? 'themes/'.Context::getContext()->employee->bo_theme.'/img/' : _PS_IMG_).'t/'.$tab['class_name'].'.gif'; + + if (trim($tab['module']) != '') + $img = _MODULE_DIR_.$tab['module'].'/'.$tab['class_name'].'.gif'; + + $tabs[$index]['current'] = ($tab['class_name'] == $this->className) || (Tab::getCurrentParentId() == $tab['id_tab']); + $tabs[$index]['img'] = $img; + $tabs[$index]['token'] = Tools::getAdminToken($tab['class_name'].(int)($tab['id_tab']).(int)$this->context->employee->id); + + $sub_tabs = Tab::getTabs($this->context->language->id, $tab['id_tab']); + foreach ($sub_tabs AS $index2 => $sub_tab) + { + if (Tab::checkTabRights($sub_tab) === true) + { + $sub_tabs[$index2]['token'] = Tools::getAdminTokenLite($sub_tab['class_name']); + } + else + unset($sub_tabs[$index2]); + } + $tabs[$index]['sub_tabs'] = $sub_tabs; + } + else + unset($tabs[$index]); + } + // Breadcrumbs + $home_token = Tools::getAdminToken('AdminHome'.intval(Tab::getIdFromClassName('AdminHome')).(int)$this->context->employee->id); + + $tabs_breadcrumb = array(); + $tabs_breadcrumb = recursiveTab($this->id, $tabs_breadcrumb); + $tabs_breadcrumb = array_reverse($tabs_breadcrumb); + + foreach ($tabs_breadcrumb AS $key => $item) + for ($i = 0; $i < (count($tabs_breadcrumb) - 1); $i++) + $tabs_breadcrumb[$key]['token'] = Tools::getAdminToken($item['class_name'].intval($item['id_tab']).(int)$this->context->employee->id); + + /* Hooks are volontary out the initialize array (need those variables already assigned) */ + $this->context->smarty->assign(array( + 'img_dir' => _PS_IMG_, + 'iso' => $this->context->language->iso_code, + 'class_name' => $this->className, + 'iso_user' => $this->context->language->id, + 'country_iso_code' => $this->context->country->iso_code, + 'version' => _PS_VERSION_, + 'help_box' => Configuration::get('PS_HELPBOX'), + 'round_mode' => Configuration::get('PS_PRICE_ROUND_MODE'), + 'brightness' => Tools::getBrightness(empty($this->context->employee->bo_color) ? '#FFFFFF' : $this->context->employee->bo_color) < 128 ? 'white' : '#383838', + 'edit_field' => isset($youEditFieldFor) ? $youEditFieldFor : '\'\'', + 'lang_iso' => $this->context->language->iso_code, + 'link' => $this->context->link, + 'bo_color' => isset($this->context->employee->bo_color) ? Tools::htmlentitiesUTF8($this->context->employee->bo_color) : null, + 'shop_name' => Configuration::get('PS_SHOP_NAME'), + 'show_new_orders' => Configuration::get('PS_SHOW_NEW_ORDERS'), + 'show_new_customers' => Configuration::get('PS_SHOW_NEW_CUSTOMERS'), + 'show_new_messages' => Configuration::get('PS_SHOW_NEW_MESSAGES'), + 'token_admin_orders' => Tools::getAdminTokenLite('AdminOrders'), + 'token_admin_customers' => Tools::getAdminTokenLite('AdminCustomers'), + 'token_admin_employees' => Tools::getAdminTokenLite('AdminEmployees'), + 'token_admin_search' => Tools::getAdminTokenLite('AdminSearch'), + 'first_name' => Tools::substr($this->context->employee->firstname, 0, 1), + 'last_name' => htmlentities($this->context->employee->lastname, ENT_COMPAT, 'UTF-8'), + 'base_url' => $this->context->shop->getBaseURL(), + 'employee' => $this->context->employee, + 'search_type' => Tools::getValue('bo_search_type'), + 'bo_query' => Tools::safeOutput(Tools::stripslashes(Tools::getValue('bo_query'))), + 'quick_access' => $quick_access, + 'multi_shop' => Shop::isMultiShopActivated(), + 'shop_list' => (Shop::isMultiShopActivated() ? generateShopList() : null), //@TODO refacto + 'tab' => $tab, + 'current_parent_id' => (int)Tab::getCurrentParentId(), + 'tabs' => $tabs, + 'install_dir_exists' => file_exists(_PS_ADMIN_DIR_.'/../install'), + 'home_token' => $home_token, + 'tabs_breadcrumb' => $tabs_breadcrumb, + 'is_multishop' => $is_multishop, + + )); + $this->context->smarty->assign(array( + 'HOOK_HEADER' => Module::hookExec('backOfficeHeader'), + 'HOOK_TOP' => Module::hookExec('backOfficeTop'), + )); + + $this->context->smarty->assign('css_files', $this->css_files); + $this->context->smarty->assign('js_files', array_unique($this->js_files)); + //$this->context->smarty->display(_PS_ADMIN_DIR_.'/themes/header.tpl'); + } + + /** + * Assign smarty variables for the page main content + */ + public function initContent() + { + } + + /** + * Assign smarty variables for the footer + */ + public function initFooter() + { + $this->context->smarty->assign(array( + 'ps_version' => _PS_VERSION_, + 'end_time' => number_format(microtime(true) - $this->timerStart, 3, '.', ''), + 'iso_is_fr' => strtoupper($this->context->language->iso_code) == 'FR', + )); + + $this->context->smarty->assign(array( + 'HOOK_FOOTER' => Module::hookExec('backOfficeFooter'), + )); + } + + public function setMedia() + { + $this->addCSS(_PS_JS_DIR_.'jquery/datepicker/datepicker.css', 'all'); + $this->addCSS(_PS_CSS_DIR_.'admin.css', 'all'); + $this->addCSS(_PS_CSS_DIR_.'jquery.cluetip.css', 'all'); + + $this->addCSS($this->path.'/themes/'.'default/admin.css', 'all'); + if ($this->context->language->is_rtl) + $this->addCSS(_THEME_CSS_DIR_.'rtl.css'); + + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.4.4.min.js'); + $this->addJS(_PS_JS_DIR_.'jquery/jquery.hoverIntent.minified.js'); + $this->addJS(_PS_JS_DIR_.'jquery/jquery.cluetip.js'); + $this->addJS(_PS_JS_DIR_.'admin.js'); + $this->addJS(_PS_JS_DIR_.'toggle.js'); + $this->addJS(_PS_JS_DIR_.'tools.js'); + $this->addJS(_PS_JS_DIR_.'ajax.js'); + $this->addJS(_PS_JS_DIR_.'notifications.js'); + } + + public static function translate($string, $class, $addslashes = FALSE, $htmlentities = TRUE) + { + $class = strtolower($class); + // if the class is extended by a module, use modules/[module_name]/xx.php lang file + //$currentClass = get_class($this); + if(false AND Module::getModuleNameFromClass($class)) + { + $string = str_replace('\'', '\\\'', $string); + return Module::findTranslation(Module::$classInModule[$class], $string, $class); + } + global $_LANGADM; + $_LANGADM = array_change_key_case($_LANGADM); + + //if ($class == __CLASS__) + // $class = 'AdminTab'; + + $key = md5(str_replace('\'', '\\\'', $string)); + + $str = (key_exists($class.$key, $_LANGADM)) ? $_LANGADM[$class.$key] : ((key_exists($class.$key, $_LANGADM)) ? $_LANGADM[$class.$key] : $string); + $str = $htmlentities ? htmlentities($str, ENT_QUOTES, 'utf-8') : $str; + return str_replace('"', '"', ($addslashes ? addslashes($str) : stripslashes($str))); + } + /** + * use translations files to replace english expression. + * + * @param mixed $string term or expression in english + * @param string $class + * @param boolan $addslashes if set to true, the return value will pass through addslashes(). Otherwise, stripslashes(). + * @param boolean $htmlentities if set to true(default), the return value will pass through htmlentities($string, ENT_QUOTES, 'utf-8') + * @return string the translation if available, or the english default text. + */ + protected function l($string, $class = 'AdminTab', $addslashes = FALSE, $htmlentities = TRUE) + { + $class = get_class($this); + return self::translate($string, $class, $addslashes, $htmlentities); + } + + public function init() + { + ob_start(); + $this->timerStart = microtime(true); + + if (isset($_GET['logout'])) + $this->context->employee->logout(); + + if (!isset($this->context->employee) || !$this->context->employee->isLoggedBack()) + Tools::redirectAdmin('login.php?redirect='.$_SERVER['REQUEST_URI']); + + // Set current index + $currentIndex = $_SERVER['SCRIPT_NAME'].(($tab = Tools::getValue('tab')) ? '?tab='.$tab : ''); + if ($back = Tools::getValue('back')) + $currentIndex .= '&back='.urlencode($back); + AdminTab::$currentIndex = $currentIndex; + + $iso = $this->context->language->iso_code; + include(_PS_TRANSLATIONS_DIR_.$iso.'/errors.php'); + include(_PS_TRANSLATIONS_DIR_.$iso.'/fields.php'); + include(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php'); + + /* Server Params */ + $protocol_link = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://'; + $protocol_content = (isset($useSSL) AND $useSSL AND Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://'; + $link = new Link($protocol_link, $protocol_content); + $this->context->link = $link; + //define('_PS_BASE_URL_', Tools::getShopDomain(true)); + //define('_PS_BASE_URL_SSL_', Tools::getShopDomainSsl(true)); + + /*$path = _PS_ADMIN_DIR_.'/themes/'; + if (empty($this->context->employee->bo_theme) OR !file_exists($path.$this->context->employee->bo_theme.'/admin.css')) + { + if (file_exists($path.'oldschool/admin.css')) + $this->context->employee->bo_theme = 'oldschool'; + elseif (file_exists($path.'origins/admin.css')) + $this->context->employee->bo_theme = 'origins'; + else + foreach (scandir($path) as $theme) + if ($theme[0] != '.' AND file_exists($path.$theme.'/admin.css')) + { + $employee->bo_theme = $theme; + break; + } + $this->context->employee->update(); + }*/ + + // Change shop context ? + if (Shop::isMultiShopActivated() && Tools::getValue('setShopContext') !== false) + { + $this->context->cookie->shopContext = Tools::getValue('setShopContext'); + $url = parse_url($_SERVER['REQUEST_URI']); + $query = (isset($url['query'])) ? $url['query'] : ''; + parse_str($query, $parseQuery); + unset($parseQuery['setShopContext']); + Tools::redirectAdmin($url['path'] . '?' . http_build_query($parseQuery)); + } + + $shopID = ''; + if ($this->context->cookie->shopContext) + { + $split = explode('-', $this->context->cookie->shopContext); + if (count($split) == 2 && $split[0] == 's') + $shopID = (int)$split[1]; + } + $this->context->shop = new Shop($shopID); + + /* Filter memorization */ + if (isset($_POST) AND !empty($_POST) AND isset($this->table)) + foreach ($_POST AS $key => $value) + if (is_array($this->table)) + { + foreach ($this->table AS $table) + if (strncmp($key, $table.'Filter_', 7) === 0 OR strncmp($key, 'submitFilter', 12) === 0) + $this->context->cookie->$key = !is_array($value) ? $value : serialize($value); + } + elseif (strncmp($key, $this->table.'Filter_', 7) === 0 OR strncmp($key, 'submitFilter', 12) === 0) + $this->context->cookie->$key = !is_array($value) ? $value : serialize($value); + + if (isset($_GET) AND !empty($_GET) AND isset($this->table)) + foreach ($_GET AS $key => $value) + if (is_array($this->table)) + { + foreach ($this->table AS $table) + if (strncmp($key, $table.'OrderBy', 7) === 0 OR strncmp($key, $table.'Orderway', 8) === 0) + $this->context->cookie->$key = $value; + } + elseif (strncmp($key, $this->table.'OrderBy', 7) === 0 OR strncmp($key, $this->table.'Orderway', 12) === 0) + $this->context->cookie->$key = $value; + } + + public function displayErrors() + { + p($this->_errors); + } + + public function postProcess() + { + + } + +} \ No newline at end of file diff --git a/classes/Tab.php b/classes/Tab.php index 754f8cc2e..54099a978 100644 --- a/classes/Tab.php +++ b/classes/Tab.php @@ -240,4 +240,16 @@ class TabCore extends ObjectModel WHERE `id_tab` = '.(int)$result[$i]['id_tab']); return true; } + + public static function checkTabRights($id_tab) + { + static $tabAccesses = NULL; + + if ($tabAccesses === NULL) + $tabAccesses = Profile::getProfileAccesses(Context::getContext()->employee->id_profile); + + if (isset($tabAccesses[(int)($id_tab)]['view'])) + return ($tabAccesses[(int)($id_tab)]['view'] === '1'); + return false; +} } diff --git a/config/config.inc.php b/config/config.inc.php index 0cd4baf8d..aa89d9d38 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -102,14 +102,14 @@ Context::getContext()->country = $defaultCountry; /* Instantiate cookie */ $cookieLifetime = (time() + (((int)Configuration::get('PS_COOKIE_LIFETIME_BO') > 0 ? (int)Configuration::get('PS_COOKIE_LIFETIME_BO') : 1)* 3600)); -if (defined('PS_ADMIN_DIR')) +if (defined('_PS_ADMIN_DIR_')) $cookie = new Cookie('psAdmin', '', $cookieLifetime); else $cookie = new Cookie('ps', '', $cookieLifetime); Context::getContext()->cookie = $cookie; /* Create employee if in BO, customer else */ -if (defined('PS_ADMIN_DIR')) +if (defined('_PS_ADMIN_DIR_')) { $employee = new Employee($cookie->id_employee); Context::getContext()->employee = $employee; @@ -123,9 +123,9 @@ else $customer = new Customer($cookie->id_customer); $customer->logged = $cookie->logged; } - else + else $customer = new Customer(); - + $customer->id_guest = $cookie->id_guest; Context::getContext()->customer = $customer; } @@ -158,7 +158,11 @@ if (function_exists('date_default_timezone_set')) @date_default_timezone_set(Configuration::get('PS_TIMEZONE')); /* Smarty */ -require_once(dirname(__FILE__).'/smarty.config.inc.php'); +if (!defined('_PS_ADMIN_DIR_')) + require_once(dirname(__FILE__).'/smarty.config.inc.php'); +else + require_once(dirname(__FILE__).'/smartyadmin.config.inc.php'); + Context::getContext()->smarty = $smarty; /* Possible value are true, false, 'URL' (for 'URL' append SMARTY_DEBUG as a parameter to the url) diff --git a/config/smartyadmin.config.inc.php b/config/smartyadmin.config.inc.php new file mode 100644 index 000000000..c7ede54b5 --- /dev/null +++ b/config/smartyadmin.config.inc.php @@ -0,0 +1,150 @@ + +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision: 6844 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +define('_PS_SMARTY_DIR_', _PS_TOOL_DIR_.'smarty/'); + +require_once(_PS_SMARTY_DIR_.'Smarty.class.php'); + +global $smarty; +$smarty = new Smarty(); +$smarty->template_dir = _PS_ADMIN_DIR_.'/themes/template'; +$smarty->compile_dir = _PS_SMARTY_DIR_.'admincompile'; +$smarty->cache_dir = _PS_SMARTY_DIR_.'admincache'; +$smarty->caching = false; +$smarty->force_compile = (Configuration::get('PS_SMARTY_FORCE_COMPILE') == _PS_SMARTY_FORCE_COMPILE_) ? true : false; +$smarty->compile_check = (Configuration::get('PS_SMARTY_FORCE_COMPILE') == _PS_SMARTY_CHECK_COMPILE_) ? true : false; +$smarty->debugging = false; +$smarty->debugging_ctrl = 'URL'; // 'NONE' on production +$smarty->deprecation_notices = false; // so many depreciated yet not migrated smarty calls + +if (Configuration::get('PS_HTML_THEME_COMPRESSION')) + $smarty->registerFilter('output', 'smartyMinifyHTML'); +if (Configuration::get('PS_JS_HTML_THEME_COMPRESSION')) + $smarty->registerFilter('output', 'smartyPackJSinHTML'); + +smartyRegisterFunction($smarty, 'modifier', 'truncate', 'smarty_modifier_truncate'); +smartyRegisterFunction($smarty, 'modifier', 'secureReferrer', array('Tools', 'secureReferrer')); + +smartyRegisterFunction($smarty, 'function', 't', 'smartyTruncate'); // unused +smartyRegisterFunction($smarty, 'function', 'm', 'smartyMaxWords'); // unused +smartyRegisterFunction($smarty, 'function', 'p', 'smartyShowObject'); // Debug only +smartyRegisterFunction($smarty, 'function', 'd', 'smartyDieObject'); // Debug only +smartyRegisterFunction($smarty, 'function', 'l', 'smartyTranslate'); + +smartyRegisterFunction($smarty, 'function', 'dateFormat', array('Tools', 'dateFormat')); +smartyRegisterFunction($smarty, 'function', 'convertPrice', array('Product', 'convertPrice')); +smartyRegisterFunction($smarty, 'function', 'convertPriceWithCurrency', array('Product', 'convertPriceWithCurrency')); +smartyRegisterFunction($smarty, 'function', 'displayWtPrice', array('Product', 'displayWtPrice')); +smartyRegisterFunction($smarty, 'function', 'displayWtPriceWithCurrency', array('Product', 'displayWtPriceWithCurrency')); +smartyRegisterFunction($smarty, 'function', 'displayPrice', array('Tools', 'displayPriceSmarty')); +smartyRegisterFunction($smarty, 'modifier', 'convertAndFormatPrice', array('Product', 'convertAndFormatPrice')); // used twice + +function smartyTranslate($params, &$smarty) +{ + global $_LANGADM; + $htmlentities = !isset($params['js']); + $addslashes = !isset($params['slashes']); + + $string = str_replace('\'', '\\\'', $params['s']); + $filename = ((!isset($smarty->compiler_object) OR !is_object($smarty->compiler_object->template)) ? $smarty->template_filepath : $smarty->compiler_object->template->getTemplateFilepath()); + $class = Tools::substr(basename($filename), 0, -4);//.'_'.md5($string); + + if(in_array($class, array('header','footer','password','login'))) + $class = 'index'; + + return AdminController::translate($string, $class, $addslashes, $htmlentities); +} + +function smartyDieObject($params, &$smarty) +{ + return Tools::d($params['var']); +} + +function smartyShowObject($params, &$smarty) +{ + return Tools::p($params['var']); +} + +function smartyMaxWords($params, &$smarty) +{ + Tools::displayAsDeprecated(); + $params['s'] = str_replace('...', ' ...', html_entity_decode($params['s'], ENT_QUOTES, 'UTF-8')); + $words = explode(' ', $params['s']); + + foreach($words AS &$word) + if(Tools::strlen($word) > $params['n']) + $word = Tools::substr(trim(chunk_split($word, $params['n']-1, '- ')), 0, -1); + + return implode(' ', Tools::htmlentitiesUTF8($words)); +} + +function smartyTruncate($params, &$smarty) +{ + Tools::displayAsDeprecated(); + $text = isset($params['strip']) ? strip_tags($params['text']) : $params['text']; + $length = $params['length']; + $sep = isset($params['sep']) ? $params['sep'] : '...'; + + if (Tools::strlen($text) > $length + Tools::strlen($sep)) + $text = Tools::substr($text, 0, $length).$sep; + + return (isset($params['encode']) ? Tools::htmlentitiesUTF8($text, ENT_NOQUOTES) : $text); +} + +function smarty_modifier_truncate($string, $length = 80, $etc = '...', $break_words = false, $middle = false, $charset = 'UTF-8') +{ + if (!$length) + return ''; + + if (Tools::strlen($string) > $length) + { + $length -= min($length, Tools::strlen($etc)); + if (!$break_words && !$middle) + $string = preg_replace('/\s+?(\S+)?$/u', '', Tools::substr($string, 0, $length+1, $charset)); + return !$middle ? Tools::substr($string, 0, $length, $charset).$etc : Tools::substr($string, 0, $length/2, $charset).$etc.Tools::substr($string, -$length/2, $charset); + } + else + return $string; +} + +function smartyMinifyHTML($tpl_output, &$smarty) +{ + $tpl_output = Tools::minifyHTML($tpl_output); + return $tpl_output; +} + +function smartyPackJSinHTML($tpl_output, &$smarty) +{ + $tpl_output = Tools::packJSinHTML($tpl_output); + return $tpl_output; +} + +function smartyRegisterFunction($smarty, $type, $function, $params) +{ + if (!in_array($type, array('function', 'modifier'))) + return false; + $smarty->registerPlugin($type, $function, $params); +} diff --git a/js/notifications.js b/js/notifications.js new file mode 100644 index 000000000..304d1c232 --- /dev/null +++ b/js/notifications.js @@ -0,0 +1,105 @@ +function getPush() +{ + $.post("ajax.php",{"getNotifications" : "1"}, function(data) { + if (data) + { + json = jQuery.parseJSON(data); + + // Add orders notifications to the list + html = ""; + nb_notifs = 0; + $.each(json.order, function(property, value) { + html += "
        • " + new_order_msg + "
          " + order_number_msg + "#" + parseInt(value.id_order) + "
          " + total_msg + "" + value.total_paid_real + "
          " + from_msg + "" + value.customer_name + "
          " + see_order_msg + "
        • "; + }); + if (html != "") + { + $("#list_orders_notif").prev("p").hide(); + $("#list_orders_notif").empty().append(html); + nb_notifs = $("#list_orders_notif li").length; + $("#orders_notif_value").text(nb_notifs); + $("#orders_notif_number_wrapper").show(); + } + else + { + $("#orders_notif_number_wrapper").hide(); + } + + // Add customers notifications to the list + html = ""; + nb_notifs = 0; + $.each(json.customer, function(property, value) { + html += "
        • " + new_customer_msg + "
          " + customer_name_msg + "" + value.customer_name + "
          " + see_customer_msg + "
        • "; + }); + if (html != "") + { + $("#list_customers_notif").prev("p").hide(); + $("#list_customers_notif").empty().append(html); + nb_notifs = $("#list_customers_notif li").length; + $("#customers_notif_value").text(nb_notifs); + $("#customers_notif_number_wrapper").show(); + } + else + { + $("#customers_notif_number_wrapper").hide(); + } + + // Add messages notifications to the list + html = ""; + nb_notifs = 0; + $.each(json.message, function(property, value) { + html += "
        • " + new_msg + "
          " + from_msg + "" + value.customer_name + "
          " + excerpt_msg + "" + value.message_customer + "
          " + see_msg + "
        • "; + }); + if (html != "") + { + $("#list_messages_notif").prev("p").hide(); + $("#list_messages_notif").empty().append(html); + nb_notifs = $("#list_messages_notif li").length; + $("#messages_notif_value").text(nb_notifs); + $("#messages_notif_number_wrapper").show(); + } + else + { + $("#messages_notif_number_wrapper").hide(); + } + } + setTimeout("getPush()",60000); + }); +} + +$().ready(function() +{ + var hints = $('.translatable span.hint'); + if (youEditFieldFor) + { + hints.html(hints.html() + '
          ' + youEditFieldFor + ''); + } + var html = ""; + var nb_notifs = 0; + var wrapper_id = ""; + var type = new Array(); + + $(".notifs").live("click", function(){ + wrapper_id = $(this).attr("id"); + type = wrapper_id.split("s_notif") + $.post("ajax.php",{"updateElementEmployee" : "1", "updateElementEmployeeType" : type[0]}, function(data) { + if(data) + { + if(!$("#" + wrapper_id + "_wrapper").is(":visible")) + { + $(".notifs_wrapper").hide(); + $("#" + wrapper_id + "_number_wrapper").hide(); + $("#" + wrapper_id + "_wrapper").show(); + }else + { + $("#" + wrapper_id + "_wrapper").hide(); + } + } + }); + }); + + $("#main").click(function(){ + $(".notifs_wrapper").hide(); + }); + + getPush(); +}); \ No newline at end of file