45 $xoTheme->addStylesheet( XOOPS_URL .
'/modules/system/css/admin.css');
48 $xoTheme->addScript(
'browse.php?Frameworks/jquery/jquery.js');
49 $xoTheme->addScript(
'browse.php?Frameworks/jquery/plugins/jquery.ui.js');
50 $xoTheme->addScript(
'browse.php?Frameworks/jquery/plugins/jquery.tablesorter.js');
51 $xoTheme->addScript(
'modules/system/js/admin.js');
57 if ( !
$GLOBALS[
"xoopsSecurity"]->check() ) {
65 $obj->setVar(
"date", time());
69 $obj->setVar(
"htmlbanner", $verif_htmlbanner);
75 $form =& $obj->getForm(
false);
88 $form = $obj->getForm();
104 if ( !
$GLOBALS[
"xoopsSecurity"]->check() ) {
120 case 'banner_finish_delete':
130 if ( !
$GLOBALS[
"xoopsSecurity"]->check() ) {
147 case 'banner_client_save':
148 if ( !
$GLOBALS[
"xoopsSecurity"]->check() ) {
164 $form =& $obj->getForm(
false);
168 case 'banner_client_edit':
177 $form = $obj->getForm();
178 $xoopsTpl->assign(
'form', $form->render());
184 case 'banner_client_delete':
193 if ( !
$GLOBALS[
"xoopsSecurity"]->check() ) {
219 $form = $obj->getForm();
220 $xoopsTpl->assign(
'form', $form->render());
229 $form = $obj->getForm();
230 $xoopsTpl->assign(
'form', $form->render());
253 $xoopsTpl->assign(
'banner_count', $banner_count );
255 if ( $banner_count > 0 )
257 foreach (array_keys($banner_arr) as
$i)
259 $bid = $banner_arr[
$i]->getVar(
"bid");
260 $imptotal = $banner_arr[
$i]->getVar(
"imptotal");
261 $impmade = $banner_arr[
$i]->getVar(
"impmade");
262 $imageurl = $banner_arr[
$i]->getVar(
"imageurl");
263 $clicks = $banner_arr[
$i]->getVar(
"clicks");
264 $htmlbanner =$banner_arr[
$i]->getVar(
"htmlbanner");
265 $htmlcode = $banner_arr[
$i]->getVar(
"htmlcode");
267 if ( is_object($name_client) )
268 $name = $name_client->getVar(
"name");
270 if ( $impmade == 0 ) {
273 $percent = substr(100 * $clicks / $impmade, 0, 5);
275 if ( $imptotal == 0 ) {
276 $left =
""._AM_SYSTEM_BANNERS_UNLIMIT.
"";
278 $left = $imptotal-$impmade;
284 $img .= html_entity_decode($htmlcode);
287 if(strtolower(substr($imageurl,strrpos($imageurl,
".")))==
".swf") {
288 $img .=
"<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=6,0,40,0\" width=\"468\" height=\"60\">";
289 $img .=
"<param name=movie value=\"$imageurl\">";
290 $img .=
"<param name=quality value=high>";
291 $img .=
"<embed src=\"$imageurl\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"468\" height=\"60\">";
295 $img .=
"<img src='".$imageurl.
"' alt='' />";
299 $banner[
'bid'] = $bid;
300 $banner[
'impmade'] = $impmade;
301 $banner[
'clicks'] = $clicks;
302 $banner[
'left'] = $left;
303 $banner[
'percent'] = $percent;
304 $banner[
'imageurl'] = $img;
305 $banner[
'name'] = $name;
308 $xoopsTpl->append_by_ref(
'banner', $banner );
309 $xoopsTpl->append_by_ref(
'popup_banner', $banner );
329 $xoopsTpl->assign(
'banner_finish_count', $banner_finish_count );
331 if ( $banner_finish_count > 0 )
333 foreach (array_keys($banner_finish_arr) as $i)
335 $bid = $banner_finish_arr[
$i]->getVar(
"bid");
337 $impressions = $banner_finish_arr[
$i]->getVar(
"impressions");
338 $clicks = $banner_finish_arr[
$i]->getVar(
"clicks");
339 if ($impressions != 0){
340 $percent = substr(100 * $clicks / $impressions, 0, 5);
343 $banner_finish[
'bid'] = $bid;
344 $banner_finish[
'impressions'] = $impressions;
345 $banner_finish[
'clicks'] = $clicks;
346 $banner_finish[
'left'] = $left;
347 $banner_finish[
'percent'] = $percent;
348 $banner_finish[
'datestart'] =
formatTimestamp($banner_finish_arr[$i]->getVar(
"datestart"),
"m");
349 $banner_finish[
'dateend'] =
formatTimestamp($banner_finish_arr[$i]->getVar(
"dateend"),
"m");
351 $banner_finish[
'name'] = $name_client->getVar(
"name");
354 $xoopsTpl->append_by_ref(
'banner_finish', $banner_finish );
355 unset( $banner_finish );
359 if ($banner_finish_count >
$nb_aff) {
373 $xoopsTpl->assign(
'banner_client_count', $banner_client_count );
375 if ( $banner_client_count > 0 )
377 foreach (array_keys($banner_client_arr) as $i)
379 $cid = $banner_client_arr[
$i]->getVar(
"cid");
384 $banner_client[
'cid'] = $cid;
385 $banner_client[
'banner_active'] = $banner_active;
386 $banner_client[
'name'] = $banner_client_arr[
$i]->getVar(
"name");
387 $banner_client[
'contact'] = $banner_client_arr[
$i]->getVar(
"contact");
388 $banner_client[
'email'] = $banner_client_arr[
$i]->getVar(
"email");
391 $xoopsTpl->append_by_ref(
'banner_client', $banner_client );
392 unset( $banner_client );
396 if ($banner_client_count >
$nb_aff) {