C:\xampp\htdocs\kptv\admin\index.php


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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<?php

require_once("conf_/admin_conf.php");
require_once(
"dbincl.php");
$test 'fdfd';
$content "";
$gagets = array();
$page = array();
$gagetsCnt "";
$logged 0;
$type_of_list 0;
$jsInclude = array();
$js = array();
$gadgetsRequire = array(); // js to include for gadgets
require_once($LIBPATH "session.php");
$session_ = new Session();
if(!(
$session_->IsRegistered("logged_"))){
//    header("location:../login.php");
    
require_once("modules/login/adminlogin.php");
    
$content form("login_frm");
}else {
$logged 1;
if(
array_key_exists("type_of_list"$_GET)){
    
$type_of_list $_GET['type_of_list'];
}

if(!
array_key_exists("cnt_"$_GET)) {
    
$_GET['cnt_'] = "home";
    
$_GET['type_of_list'] = 1;
}
{
    
$moduleName $requestPage $requestFunction "";
    
$rqArray explode("/"$_GET['cnt_']);
    
//print_r($rqArray);exit();
    
$moduleName $rqArray[0];
    
$path "modules/$moduleName/";
    if(
count($rqArray) == 1){
        
//echo 'test1';exit();
        
$path.=$moduleName".php";}
    else if(
count($rqArray) ==2) {
        
//echo 'test2';exit();
        
$path.=$rqArray[1] . ".php";
    }
    if(!@include_once(
$path)) {
        
$_GET['st'] = 10;
        include_once(
"modules/$landingModule/$landingModule.php");
    }
    else {    
// init gadged modules
        
foreach($gagets as $gaget) {
            include_once(
"gagets/$gaget".php");
            
$cn "";
            
$cls = new $gaget();
            
$cn.="<div id='gaget_content'>" $cls->GetContent() . "</div>";
            
$gagetsCnt.="<div id='gaget_title'>" .  $cls->name "</div>";
            
$gagetsCnt.=$cn;
            if(isset(
$cls->require_)) {
                
$jsInclude+=$cls->require_;
                }
            }
        }
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<title>KPTV Admin</title>
<script type="text/javascript" language="javascript" src="js/admin.js"></script>
<script type="text/javascript" language="javascript" src="js/validation.js"></script>
<?php
$jsInclude 
array_unique($jsInclude);
// js include
foreach($jsInclude as $rq)
    
print_r("<script type=\"text/javascript\" language=\"javascript\" src=\"js/$rq\"></script>\n");
?>
<link href="css/layout.css" rel="stylesheet" type="text/css" />
<link href="css/admin.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
}
-->
</style>
<script type="text/JavaScript">
<!--



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>
<body>
<div id="banner">
<div id="accountName">User : <?php print_r($session_->GetVar("uname")); ?><br/><br/><a href="mod.php?mod=logout&action=logout">Logout</a></div>
 <div></div><br/>
</div>
<div id="bannerSep">&nbsp;</div>
<div id="menu">
</div>
<!--    <?php
        
if($logged) {    ?>        -->
<div id="navigation">
    <?php
        
if($logged) {
            require_once(
"conf_/admin_conf.php");
            require_once(
$LIBPATH "libutil.php");
            echo(
Navigation($Adm_sections$session_->GetVar("rights")));
    
?>
    <!--div id="navigation_btn"><!--img src="img/logout.jpg" /-><br/>
    <a href="mod.php?mod=logout&action=logout">Logout</a></div--><br/>
    <?php ?>
</div>
            <!--        <?php ?> -->

<div id="content">
<div id="menu_status">
    <?php
        
if(array_key_exists("st"$_GET)) {
            require_once(
"strings/en.php");
            if(
$_GET['st'] < 500) {
                echo(
"<img src=\"img/alert.jpg\" align=\"middle\">&nbsp;&nbsp;");
                echo(
$PHRASE[$_GET['st']]);
                echo 
"</br>";echo "</br>";
            }
            else {
                echo(
"<img src=\"img/success.jpg\" align=\"middle\">&nbsp;&nbsp;");
                echo(
$PHRASE[$_GET['st']]);
                echo 
"</br>";echo "</br>";
            }
            
        }
        else
            echo(
"&nbsp;");
    
?>
</div>
    <?php 
        
if ($_GET['cnt_'] == "home"){    $path2 "Home"; }
        
        else if (
$_GET['cnt_'] == "pages"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; Pagini"; }
        else if (
$_GET['cnt_'] == "pages/pageAdd"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=pages\">Pagini</a> &raquo; Adaugare pagina"; }
        else if (
$_GET['cnt_'] == "pages/pageDetails"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=pages\">Pagini</a> &raquo; Editare pagina"; }
        
        else if (
$_GET['cnt_'] == "articles"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; Articole"; }
        else if (
$_GET['cnt_'] == "articles/articleAdd"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=articles\">Articole</a> &raquo; Adaugare articol"; }
        else if (
$_GET['cnt_'] == "articles/articleDetails"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=articles\">Articole</a> &raquo; Editare articol"; }
        
        else if (
$_GET['cnt_'] == "items"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; Items"; }
        else if (
$_GET['cnt_'] == "items/itemsAdd"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=items\">Items</a> &raquo; Adaugare item"; }
        else if (
$_GET['cnt_'] == "items/itemsDetails"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=items\">Items</a> &raquo; Editare item"; }
        
        else if (
$_GET['cnt_'] == "items2"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; Items2"; }
        else if (
$_GET['cnt_'] == "items2/items2Add"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=items2\">Items2</a> &raquo; Adaugare item"; }
        else if (
$_GET['cnt_'] == "items2/items2Details"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=items2\">Items2</a> &raquo; Editare item"; }
        
        else if (
$_GET['cnt_'] == "items3"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; Items3"; }
        else if (
$_GET['cnt_'] == "items3/items3Add"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=items3\">Items3</a> &raquo; Adaugare item"; }
        else if (
$_GET['cnt_'] == "items3/items3Details"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=items3\">Items3</a> &raquo; Editare item"; }
                
        else if (
$_GET['cnt_'] == "albums"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; Albume"; }
        else if (
$_GET['cnt_'] == "albums/albumsAdd"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=albums\">Albume</a> &raquo; Adaugare album"; }
        else if (
$_GET['cnt_'] == "albums/albumsDetails"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=albums\">Albume</a> &raquo; Editare albume"; }
        
        else if (
$_GET['cnt_'] == "gallerydir"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; Galerii foto"; }
        else if (
$_GET['cnt_'] == "gallerydir/gallerydirAdd"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=gallerydir\">Galerii foto</a> &raquo; Adauga galerie"; }
        else if (
$_GET['cnt_'] == "gallerydir/gallerydirDetails"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=gallerydir\">Galerii foto</a> &raquo; Editeaza galeria"; }
        
        else if (
$_GET['cnt_'] == "gallery"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; Imagini galerii foto"; }
        else if (
$_GET['cnt_'] == "gallery/galleryAdd"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=gallery\">Imagini galerii foto</a> &raquo; Adauga imagine"; }
        else if (
$_GET['cnt_'] == "gallery/galleryDetails"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=gallery\">Imagini galerii foto</a> &raquo; Editeaza imaginea"; }
        
        else if (
$_GET['cnt_'] == "banners"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; Bannere"; }
        else if (
$_GET['cnt_'] == "banners/bannerDetails"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=banners\">Bannere</a> &raquo; Editare banner"; }
        
        else if (
$_GET['cnt_'] == "stiri"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; Stiri"; }
        else if (
$_GET['cnt_'] == "stiri/stiriAdd"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=stiri\">Stiri</a> &raquo; Adauga stire"; }
        else if (
$_GET['cnt_'] == "stiri/stiriDetails"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=stiri\">Stiri</a> &raquo; Editare stire"; }
        
        else if (
$_GET['cnt_'] == "top20"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; Top20"; }
        else if (
$_GET['cnt_'] == "top20/top20Add"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=top20\">Top20</a> &raquo; Adaugare Top 20"; }
        else if (
$_GET['cnt_'] == "top20/top20Details"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=top20\">Top20</a> &raquo; Editare Top 20"; }
        
        else if (
$_GET['cnt_'] == "top20plus"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; TopListPlus"; }
        else if (
$_GET['cnt_'] == "top20plus/top20plusAdd"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=top20plus\">TopListPlus</a> &raquo; Adaugare Top List Plus Song"; }
        else if (
$_GET['cnt_'] == "top20plus/top20plusDetails"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=top20plus\">TopListPlus</a> &raquo; Editare Top List Plus Song"; }
        
        
//toplistcategories
        
else if ($_GET['cnt_'] == "toplistcategories"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; TopListCategories"; }
        else if (
$_GET['cnt_'] == "toplistcategories/toplistcategoriesAdd"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=toplistcategories\">TopListCategories</a> &raquo; Adaugare Top List Categories"; }
        else if (
$_GET['cnt_'] == "toplistcategories/toplistcategoriesDetails"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=toplistcategories\">TopListCategories</a> &raquo; Editare Top List Categories"; }
        
        else if (
$_GET['cnt_'] == "today"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; Astazi in muzica"; }
        else if (
$_GET['cnt_'] == "today/todayAdd"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=today\">Astazi in muzica</a> &raquo; Adauga muzica astazi"; }
        else if (
$_GET['cnt_'] == "today/todayDetails"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; <a href=\"index.php?cnt_=today\">Astazi in muzica</a> &raquo; Editare muzica astazi"; }
        
        else if (
$_GET['cnt_'] == "settings"){    $path2 "<a href=\"index.php?cnt_=home\">Home</a> &raquo; Set&atilde;ri"; }
    
?>
    <div style="font-weight: bold; margin-top: 20px; font-family:Arial; font-size:12px;"> <?php echo $path2?></div>
    <br/>
    <?php if ($_GET['cnt_'] == "top20" || $_GET['cnt_'] == "top20plus") { 
        echo 
'<div style="font-weight: bold; margin-top: 20px; font-family:Arial; font-size:12px;">Categorie:';
        include(
'config.php');
        
$sql=mysql_query("SELECT * FROM  toplistcategories ORDER BY title ASC");
        
$i 0;
        while(
$row=mysql_fetch_array($sql)) {
            
//print_r($row);
            
echo '<a href="index.php?cnt_='.$_GET['cnt_'].'&type_of_list='.$row[ID].'" style="padding:10px; 0"> '.$row[title].' </a>';
        }        
        echo 
'</div>';
        } 
?>
    <?php
  
if($gagetsCnt == "") { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><?
            
if(count($page) == 0)
            
print_r("<br/>");
        
$type_of_list 2;
        
print_r($content);
        foreach(
$page as $page_) {
            require_once(
"modules/$moduleName/$page_");
        }
        if(
count($page) == 0)
            
print_r("<br/>");
        
?>
      </td>
    </tr>
  </table>
  <? } else { ?>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="90%" valign="top">
      <?
          
if(count($page) == 0)
            
print_r("<br/>");
        
print_r($content);
        foreach(
$page as $page_) {
            require_once(
"modules/$moduleName/$page_");
        }
        if(
count($page) == 0)
            
print_r("<br/>");
        
?>      </td>
      <td width="11%" valign="top">
      <?
          print_r
($gagetsCnt);
      
?>      </td>
    </tr>
  </table>
  <? ?>
</div>
  <div id="bottom">&copy; <?= date("Y"); ?> KPTV </div>
  <?php
if(count($js) > 0) {
    
print_r("<script language=\"javascript\">\n");
    foreach(
$js as $cd) {
        
print_r($cd "\n");
    }
    
print_r("</script>\n");
}
?>
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/ro_RO/sdk.js#xfbml=1&version=v2.3";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
</body>
</html>
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586