Blame view

templates/admin/admin.tpl 11.2 KB
42868d70   andryeyev   Создал GIT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
  <html>
  <head>
  <title>Àäìèíêà</title>
  <META name="description" content="Àäìèíêà" lang="ru">
  <META name="keywords" content="Àäìèíêà">
  <META http-equiv=content-type content="text/html; charset=windows-1251">
  <link href="{$smarty.const.URL}/css/admin.css" rel="stylesheet" type="text/css">
  <script language="javascript" type="text/javascript" src="{$smarty.const.URL}js/tiny_mce/tiny_mce.js"></script>
  
  <link rel="stylesheet" type="text/css" media="all" href="{$smarty.const.URL}js/calendar/calendar-system.css" title="win2k-cold-1" />
  <script type="text/javascript" src="{$smarty.const.URL}js/calendar/calendar.js"></script>
  <script type="text/javascript" src="{$smarty.const.URL}js/calendar/lang/cal-ru.js"></script>
  <script type="text/javascript" src="{$smarty.const.URL}js/calendar/calendar-setup.js"></script>
  
  <!-- if !$rules_info_one.action &&  !$rules_kuy_one.action -->
  <script type="text/javascript">
  <!--
  {literal}
  
    function myFileBrowser (field_name, url, type, win) {
  
      var cmsURL = "{/literal}{$smarty.const.URL}{literal}js/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php";    // script URL - use an absolute path!
      if (cmsURL.indexOf("?") < 0) {
          //add the type as the only query parameter
          cmsURL = cmsURL + "?type=" + type;
      }
      else {
          //add the type as an additional query parameter
          // (PHP session ID is now included if there is one at all)
          cmsURL = cmsURL + "&type=" + type;
      }
  
      tinyMCE.activeEditor.windowManager.open({
          file : cmsURL,
          title : 'My File Browser',
          width : 782,  // Your dimensions may differ - toy around with them!
          height : 440,
          resizable : "yes",
          inline : "yes",  // This parameter only has an effect if you use the inlinepopups plugin!
          close_previous : "no"
      }, {
          window : win,
          input : field_name
      });
      return false;
    }
  
  
  {/literal}
  //-->
   </script>
  
  
  {literal}
  <script type="text/javascript">
  <!--
  
          tinyMCE.init({
                  // General options
  language : "ru",
  mode : "exact",
  elements : "text,text_ukr,features,form[text],about,teh",
                  theme : "advanced",
                  plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
  
                  // Theme options
                  theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
                  theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
                  theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
                  theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
                  theme_advanced_toolbar_location : "top",
                  theme_advanced_toolbar_align : "left",
                  theme_advanced_statusbar_location : "bottom",
                  theme_advanced_resizing : true,
  				extended_valid_elements : "iframe[name|src|framespacing|border|frameborder|scrolling|title|height|width]",
  
                  // Example content CSS (should be your site CSS)
                  content_css : "{/literal}{$config->url}{literal}/js/tiny_mce/style.css",
                  file_browser_callback : 'myFileBrowser',
                          paste_use_dialog : false,
                          theme_advanced_resizing : true,
                          theme_advanced_resize_horizontal : true,
                          apply_source_formatting : true,
                          force_br_newlines : true,
                          force_p_newlines : false,
                          relative_urls : false
          });
  
  
  
  //-->
   </script>
  {/literal}
  
  <!-- /if -->
  
  {literal}
  <script language="JavaScript">
  <!--
  
  function openWin(path) {
    myWin= open(path, "displayWindow",
      "width=650,height=400,status=yes,toolbar=no,menubar=no,scrollbars=yes");
    myWin.focus();
  }
  
  function topic(obj){
  if(obj.title.value!='')return true;
  else alert("Çàïîëíèòå âñå ïîëÿ!");
  
  return false;
  }
  
  function popup_forum(treeID,topicID) {
    myWin= open("/forum_comment.php?treeID="+treeID+"&topicID="+topicID, "displayWindow",
      "width=700,height=300,status=no,toolbar=no,menubar=no");
    myWin.focus();
  }
  
  
  function popup_forum_edit(commentID) {
    myWin= open("/forum_comment_edit.php?commentID="+commentID, "displayWindow",
      "width=600,height=300,status=no,toolbar=no,menubar=no");
      myWin.focus();
  }
  
     function del(url){
      if(confirm("Óäàëèòü?")){
          document.location=url;
          return true;
      }return false;
     }
  // -->
  </script>
  
  {/literal}
  
  <script>{literal}
  function check(n){
   var div = document.getElementById('check_box')
   var elems = div.getElementsByTagName('input');
   for(var i=0; i<elems.length; i++){
    if(elems[i].id==n)continue;
    var reg=eval('/'+n+'/');
    if(reg.test(elems[i].id)){
     result = (elems[i].checked ? false : true);
     elems[i].checked = result;
    }
   }
   return true;
  }
  {/literal}</script>
  </head>
  
  <body bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0" marginheight="0" marginwidth="0" bgcolor="#ffffff">
  
  
  
  
  <table cellpadding="1" cellspacing="0" border="0" background="#ffffff" width="100%" height="100%">
  <tr height="100%">
  <td width="230">
   <table cellpadding="0" cellspacing="0" width="100%" height="100%">
    <tr><td class="bord"></td></tr>
    <tr><td height="100%" valign="top">
      <table cellpadding="0" cellspacing="0" width="100%">
       <tr><td class="left_hot"><font color="#1273C4"><b>Ñèñòåìà àäìèíèñòðèðîâàíèÿ<br>ñàéòà</b></font></td></tr>
       <tr><td align="center"><img src="{$smarty.const.URL}img/admin/logo_artweb.jpg" border="0" width="189" height="118"></td></tr>
       <tr><td align="center">&nbsp;</td></tr>
       <tr><td align="center">
          Âû âîøëè êàê, {php} echo $_SESSION['admin']['login'];{/php}
          <input type="button" value="Âûõîä" class="submit_red" onClick="document.location='{$smarty.const.URL}admin.php?exit'">
       </td></tr>
       <tr><td align="center"><img src="{$smarty.const.URL}img/admin/hr1.jpg" height="3" width="189" border="0"></td></tr>
       <tr><td class="left_hot">
           <div class='adminMenu'>
   
2d59f071   andryeyev   + Моддинг главног...
178
179
          {php}
           
42868d70   andryeyev   Создал GIT
180
181
182
              global $path; $H1Title='';
              $sql = "SELECT id, alias, name, action, `group` FROM rules WHERE parent_id=1";
              $result=mysql_query($sql) or die (mysql_error());
2d59f071   andryeyev   + Моддинг главног...
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
              if (mysql_affected_rows()!=0) 
              {
                  while ($menu=mysql_fetch_assoc($result)) 
                  {
                      // ==== MENU ====
                      
                      echo "<ul class='menu'>";
                      
                      if (in_array($_SESSION['admin']['group'], explode(":",$menu['group']))) 
                      {
                          if ($_GET['action'] == $menu['action'] && $_GET['action'] != '') 
                          { 
                              $active = 'class="activeMenu"'; 
                          } 
                          else 
                          { 
                              $active = ''; 
                          }
  
                          //echo "<li $active><a>".$menu['name']."</a></li>";
                          echo "<li class='main-menu'><a>".$menu['name']."</a></li>";
42868d70   andryeyev   Создал GIT
204
                      }
2d59f071   andryeyev   + Моддинг главног...
205
206
                      
                      // ==== SUB-MENU ====
42868d70   andryeyev   Создал GIT
207
208
209
                  
                      $sql2 = "SELECT alias, name, action, `group` FROM rules WHERE parent_id=".$menu['id']."";
                      $result2=mysql_query($sql2) or die (mysql_error());
2d59f071   andryeyev   + Моддинг главног...
210
211
212
                      if (mysql_affected_rows() != 0) 
                      {
                          echo "<ul class='sub-menu'>";
42868d70   andryeyev   Создал GIT
213
                          
2d59f071   andryeyev   + Моддинг главног...
214
215
216
217
218
219
220
221
222
223
224
225
226
227
                          while ($submenu = mysql_fetch_assoc($result2)) 
                          {       
                              if (in_array($_SESSION['admin']['group'], explode(":",$submenu['group']))) 
                              {
                                  if ($_GET['action'] == $submenu['action'] && $_GET['action'] != '' 
                                      || (isset($path[2]) && $path[2] == $submenu['action']))
                                  { 
                                      $active = 'class="activeMenu"'; 
                                      $H1Title = $submenu['name'];
                                  } 
                                  else 
                                  { 
                                      $active = '';
                                  }
42868d70   andryeyev   Создал GIT
228
                                  
2d59f071   andryeyev   + Моддинг главног...
229
230
231
232
                                      $total = '';
                                      
                                      if ($submenu['action'] == 'messages') 
                                      {
42868d70   andryeyev   Создал GIT
233
234
235
                                          $sql3 = "SELECT id FROM zlo_users_message WHERE `status`=1 ";
                                          $result3=mysql_query($sql3) or die (mysql_error());
                                          $total=mysql_affected_rows();
2d59f071   andryeyev   + Моддинг главног...
236
                                          $total = $total != 0 ? "($total)" : '';
42868d70   andryeyev   Создал GIT
237
238
                                      }
                                          
2d59f071   andryeyev   + Моддинг главног...
239
                                      echo "<li $active><a href='/".$submenu['alias']."'>".$submenu['name']." $total</a></li>";
42868d70   andryeyev   Создал GIT
240
241
242
                              }
                          
                          }
2d59f071   andryeyev   + Моддинг главног...
243
244
                          
                          echo "</ul>";
42868d70   andryeyev   Создал GIT
245
                      }
2d59f071   andryeyev   + Моддинг главног...
246
247
                      
                      echo "</ul>";
42868d70   andryeyev   Создал GIT
248
                  }
2d59f071   andryeyev   + Моддинг главног...
249
250
251
252
253
254
255
256
                  
              }
              
              if ($_SESSION['admin']['group'] == 1)
              {
                  echo "<ul class='menu'><li class='main-menu'><a href=\"/tmp/opros.csv\" target=\"_blank\">Ñêà÷àòü CSV ñ îïðîñîì</a></li></ul>";
        
                  echo "<ul class='menu'><li class='main-menu'><a href=\"/admin.php?action=catalogs&modAction=parser\">Ïàðñåð</a></li></ul>";
42868d70   andryeyev   Создал GIT
257
              }
2d59f071   andryeyev   + Моддинг главног...
258
259
              
          {/php}
42868d70   andryeyev   Создал GIT
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
          </div>
       </td></tr>
      </table>
    </td></tr>
    <tr><td class="bord"></td></tr>
   </table>
  </td>
  <td>
   <table cellpadding="0" cellspacing="0" width="100%" height="100%">
    <tr><td class="bord" align="right"><a href="{$smarty.const.URL}admin.php?action=rules" id="link1">Óïðàâëåíèå ñòðàíèöàìè</a></td></tr>
    <tr><td height="100%" class="content_site" valign="top">
     <h1 class="H1Title">{php} echo $H1Title;{/php}</h1>
     
     {php} global $path; if (!isset($path[1]) || (isset($path[1]) && $path[1]!='admin.php')) { {/php}
     
  		{include file="error.tpl"}
  		{include file="$tpl"}
  		
  	{php} } else { 
  		
  			// Ïîäêëþ÷àåì ôàéëû		
              if (is_file($_SERVER['DOCUMENT_ROOT'].'/account/admin/'.$path[2].'.php')) {
                  include($_SERVER['DOCUMENT_ROOT'].'/account/admin/'.$path[2].'.php');
  			}
          }
  
  	{/php}
  	
  	
    </td></tr>
    <tr><td class="bord"></td></tr>
   </table>
  </td>
  </tr>
  </table>
  
  <!--Ðàçðàáîòàíî ñòóäèåé "ÀðòÂåá" -->