-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.wml
192 lines (157 loc) · 7.39 KB
/
index.wml
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
<?php
// @include 'analytics.admob.com.php';
$systemdir=$pwd."system/";
require($systemdir."env.php");
//smarty
require ($smartydir.'Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = $systemdir.'templates';
$smarty->compile_dir = $systemdir.'templates_c';
$smarty->cache_dir = $systemdir.'cache';
$smarty->config_dir = $systemdir.'configs';
//iskljuci ovo!!
$smarty->compile_check = true;
$smarty->debugging = true;
$smarty->debugging = false;
//start
// $prviput=false;if (!isset($sid)) $prviput=true;
//wurfl
include ($systemdir."wurfl.php");
//phpbb integracija
define('PAGE_MAIN', true);
define('PWD', "");
include( $systemdir."phpbb.php" );
//funkcije
include ($systemdir."funkcije.php");
$where ="loginid = ".$userdata['user_id'];$profildata=profildata("profil", $where);
// citanje i setovanje sesija
define ("SID" ,'sid=' . $userdata['session_id']); $atr="&".SID;
// odredjivanje puta i ostalih indikatora
if (isset($HTTP_GET_VARS['put']))$put = $HTTP_GET_VARS['put']; else $put="prva";
$css = $HTTP_GET_VARS['css'];
$sput = $HTTP_GET_VARS['sput'];
$pocetak = $HTTP_GET_VARS['pocetak'];
if (!isset($kes)) $kes = 1;
if (!isset($w)) $w = 0;
if (isset($HTTP_GET_VARS['tema'])) $profildata['tema']=$HTTP_GET_VARS['tema'];
if (isset($HTTP_GET_VARS['stanica'])) $sitedata['stanica']=$HTTP_GET_VARS['stanica'];
if (isset($HTTP_GET_VARS['tvdatum'])) $sitedata['tvdatum']=$HTTP_GET_VARS['tvdatum'];
if (isset($HTTP_GET_VARS['ikonice'])) $profildata['ikonice']=$HTTP_GET_VARS['ikonice'];
if (!isset($profildata['tema']) || $profildata['tema'] == "" ) $profildata['tema']="standard";
if (!isset($profildata['ikonice'])|| $profildata['ikonice'] == "") $profildata['ikonice']="standardne";
if (isset($HTTP_GET_VARS['tmplate'])) { $profildata['tmplate']=$HTTP_GET_VARS['tmplate'];
$atr=$atr."&tmplate=".$profildata['tmplate'];}
elseif (!isset($profildata['tmplate'])|| $profildata['tmplate'] == "" || $userdata['user_id']=="-1"){
if ($myDevice->getDeviceCapability("html_wi_w3_xhtmlbasic")) $profildata['tmplate']= "xhtml";
else $profildata['tmplate']= "xhtml";
}
if (!isset ($HTTP_GET_VARS['url'])) {
if ($put=="last10") {$url = "http://wap.srb.rs/forum/feed.php";
$put="rssread";
}}
else { $url=$HTTP_GET_VARS['url'];
if ($put=="prognoza") $url="http://serbian.wunderground.com/auto/rss_full/global/stations/".$HTTP_GET_VARS['url'].".xml" ;
else $put="rssread";}
//jezik
if (isset($HTTP_GET_VARS['lang'])) $userdata['user_lang']=$HTTP_GET_VARS['lang'];
if ($userdata['user_lang'] == 'serbian_cyrillic') include ($langdir."cir.php");
else if ($userdata['user_lang'] == 'serbian') include ($langdir."lat.php");
else include ($langdir."lat.php");
//dozvole
if ($put=='admin' || $put=='op' ) $doz=1;
elseif ($put=='profil' || $put=='chata') $doz=5;
else $doz=10;
//uzimanje slicica
if ( $myDevice->getDeviceCapability("gif")) $picext="gif";
else $picext="gif";
$pdir = $picdir.$profildata['ikonice'];
if(!($dp = @opendir("$pdir"))) {echo "<br/><b>Ne mogu da otvorim:</b> $pdir"; return("greska");}
$file_array = array();
while ($file = readdir ($dp))
{
if(substr($file,0,1) != '.' and $file == "indexz.wml")
{
list($naziv, $kusur)= explode(".", $file);
if ($kusur == $picext) $file_array[$naziv] = '<img src="pic/'.$profildata['ikonice'].'/'.$file.'" alt="'.$naziv.'" />';
//ukidanje slicica - PRIVREMENO
$file_array[$naziv]="";
}
}
//provera logina
phbblogin();
//ko si ti
$nick=$userdata['username'];
$profildata['status']="login"; if (profil($profildata)) ;//echo "LOGIN ne radi";
if ($nick == "Anonymous") $nick=""; $profildata['put']=$put;
//zaglavlje
include ($systemdir."templates/".$profildata['tmplate']."/index.php");
//login/profil ikonica/link
if ( !$userdata['session_logged_in'] )
{
$sitedata["lp"]="login"; $sitedata["lpurl"]="forum/login.php?redirect=../$atr&s=$s\" title=\"".$lang_display[$login];
$file_array["lp"] = '<img src="pic/'.$profildata['ikonice'].'/login.'.$picext.'" alt="login" />';
$lang_display["lp"]=$lang_display["login"];
}
else
{
$sitedata["lp"]="profil";$sitedata["lpurl"]="?put=profil$atr";
$file_array["lp"] = '<img src="pic/'.$profildata['ikonice'].'/profil.'.$picext.'" alt="profil" />';
$lang_display["lp"]=$lang_display['profil'];
}
//ponistavanje login slicice -PRIVREMENO RESENJE
$file_array["lp"]="";
$file_array["srblogo"]='<img src="pic/'.$profildata['ikonice'].'/srblogo.'.$picext.'" alt="[logo]" />';
// $file_array["srblogo"]='<img src="pic/.ostale/krajina.gif" alt="[logo]" />';
if ($prviput){$sitedata["sput"] = $put;$put="pput"; }
if (!is_file($systemdir."templates/".$profildata['tmplate']."/$put.tpl")){$sitedata["sput"] = $put; $put = "nema";}
// ob_start();
if (is_file($includedir."$put.php")) include ($includedir."$put.php");
// ob_end_clean();
//echo $put;
// da pokusam brojac da ubacim
ob_start();
require ($systemdir."counter/phpcounter.php");
$sitedata["brojac"] = ob_get_contents();
ob_end_clean();
//grupisanje podataka
$sitedata["ext"] = $profildata['tmplate'];
$sitedata["picext"] = $picext;
$sitedata["kusur"] = $kusur;
$sitedata["put"] = $put;
$sitedata["css"] = $profildata['tema'];
$lang_display["pozdrav"] = $lang_display["Dobrodosli"]."<b>".$lang_display["SRBWap"]."</b><br/>";
// $lang_display["pozdrav"] = "<b>DA SE NE ZABORAVI<br/>Hrvatsko etnicko ciscenje Republike Srpske Krajine<br/>13ta godina<br/></b>";
// $lang_display["pozdrav"] = "<b>Srecnu Novu 2009 Godinu<br/>Zeli Vam Srb W@P</b><br/>";
// $lang_display["pozdrav"] = "<b>Srecan Badnji Dan<br/>Zeli Vam Srb W@P</b><br/>";
// $lang_display["pozdrav"] = "<b>Srecnu Srpsku Novu 2008 Godinu<br/>Zeli Vam Srb W@P</b><br/>";
// $lang_display["pozdrav"] = "<b>Mir Boziji<br/>Hristos se rodi<br/>Vaistinu se rodi</b><br/>";
// $lang_display["pozdrav"] = '<b><img src="chat/emo/msn/rose.gif" alt=""/>drage dame<br/>srecan 8.mart</b><br/>';
// $lang_display["pozdrav"] = "<b>Hristos Vaskrese<br/>Vaistinu Vaskrese</b><br/>";
//Google-Analytics
@include 'Google-Analytics.php';
$googleAnalyticsImageUrl = googleAnalyticsGetImageUrl();
$lang_display["pozdrav"] = $lang_display["pozdrav"].'<img src="'.$googleAnalyticsImageUrl .'" alt="" />';
// jos jedan analizator
// $svasta = admob_request($admob_params);
// $lang_display["pozdrav"] = $lang_display["pozdrav"].$svasta;
// i jos jedan
//$lang_display["pozdrav"] = $lang_display["pozdrav"].'<img src="http://52773.track.mobilestats.net/trackimage.ashx?sid=52773&ma_page='.$put.'" />';
// kecho "a";
//ubacivanje podataka u template
$smarty->assign("title", "$title");
$smarty->assign("lang_display",$lang_display);
$smarty->assign("profildata",$profildata);
$smarty->assign("ext",$sitedata["ext"]);
$smarty->assign("atr",$atr);
$smarty->assign("put",$sitedata["put"]);
$smarty->assign("userdata",$userdata);
$smarty->assign("slika", $file_array);
// $smarty->assign("Device",$Device);
$smarty->assign("myDevice",$myDevice);
$smarty->assign("sitedata",$sitedata);
//i kamera.. ton... akcija...
$smarty->display("index.tpl");
$profildata['status']="update"; if (profil($profildata)); //echo "UPDATE ne radi"; echo "UPDATE radi";
//webtrace
@include 'phpwebtrace.php';
?>