mambo的cms源代码

源代码在线查看: admin.banners.html.php

软件大小: 2053 K
上传用户: bonylee_java
关键词: mambo cms 源代码
下载地址: 免注册下载 普通下载 VIP

相关代码

								/**				* @version $Id: admin.banners.html.php,v 1.10 2005/02/15 14:49:39 kochp Exp $				* @package Mambo				* @subpackage Banners				* @copyright (C) 2000 - 2005 Miro International Pty Ltd				* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL				* Mambo is Free Software				*/								/** ensure this file is being included by a parent file */				defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );								/**				* @package Mambo				* @subpackage Banners				*/				class HTML_banners {									function showBanners( &$rows, &$pageNav, $option ) {						global $my, $adminLanguage;										mosCommonHTML::loadOverlib();						?>																																																																																																																																																																																																																																	$k = 0;						for ($i=0, $n=count( $rows ); $i < $n; $i++) {							$row = &$rows[$i];											$row->id 	= $row->bid;							$link 		= 'index2.php?option=com_banners&task=editA&hidemainmenu=1&id='. $row->id;											$impleft 	= $row->imptotal - $row->impmade;							if( $impleft < 0 ) {								$impleft 	= "unlimited";							}											if ( $row->impmade != 0 ) {								$percentClicks = substr(100 * $row->clicks/$row->impmade, 0, 5);							} else {								$percentClicks = 0;							}											$task 	= $row->showBanner ? 'unpublish' : 'publish';							$img 	= $row->showBanner ? 'publish_g.png' : 'publish_x.png';							$alt = $row->showBanner ? $adminLanguage->A_COMP_PUBLISHED : $adminLanguage->A_COMP_UNPUBLISHED;											$checked 	= mosCommonHTML::CheckedOutProcessing( $row, $i );							?>																																																																															if ( $row->checked_out && ( $row->checked_out != $my->id ) ) {									echo $row->name;								} else {									?>																																												}								?>																																																																																																																																																																					$k = 1 - $k;						}						?>																																																									}									function bannerForm( &$_row, &$lists, $_option ) {						global $adminLanguage;						mosMakeHtmlSafe( $_row, ENT_QUOTES, 'custombannercode' );						?>																		function changeDisplayImage() {							if (document.adminForm.imageurl.value !='') {								document.adminForm.imagelib.src='../images/banners/' + document.adminForm.imageurl.value;							} else {								document.adminForm.imagelib.src='images/blank.png';							}						}						function submitbutton(pressbutton) {							var form = document.adminForm;							if (pressbutton == 'cancel') {								submitform( pressbutton );								return;							}							// do field validation							if (form.name.value == "") {								alert( "" );							} else if (getSelectedValue('adminForm','cid') < 1) {								alert( "" );							} else if (!getSelectedValue('adminForm','imageurl')) {								alert( "" );							} else if (form.clickurl.value == "") {								alert( "" );							} else {								submitform( pressbutton );							}						}						//-->																																						:																																																																																																							:																																																						:																																																						:																					if ($_row->imptotal == "0") {								$unlimited="checked";								$_row->imptotal="";							} else {								$unlimited = "";							}							?>																																															:																																																						:																																																						:																																																						:																																																																																																																																																				:																												if (eregi("swf", $_row->imageurl)) {								?>																							} elseif (eregi("gif|jpg|png", $_row->imageurl)) {								?>																							} else {								?>																							}							?>																																																																																										}				}								/**				* Banner clients				* @package Mambo				*/				class HTML_bannerClient {									function showClients( &$rows, &$pageNav, $option ) {						global $my, $adminLanguage;										mosCommonHTML::loadOverlib();						?>																																																																																																																																																																																														$k = 0;						for ($i=0, $n=count( $rows ); $i < $n; $i++) {							$row = &$rows[$i];											$row->id 	= $row->cid;							$link 		= 'index2.php?option=com_banners&task=editclientA&hidemainmenu=1&id='. $row->id;											$checked 	= mosCommonHTML::CheckedOutProcessing( $row, $i );							?>																																																																															if ( $row->checked_out && ( $row->checked_out != $my->id ) ) {									echo $row->name;								} else {									?>																																												}								?>																																																																													$k = 1 - $k;						}						?>																																																					}									function bannerClientForm( &$row, $option ) {						global $adminLanguage;						mosMakeHtmlSafe( $row, ENT_QUOTES, 'extrainfo' );						?>																		function submitbutton(pressbutton) {							var form = document.adminForm;							if (pressbutton == 'cancelclient') {								submitform( pressbutton );								return;							}							// do field validation							if (form.name.value == "") {								alert( "" );							} else if (form.contact.value == "") {								alert( "" );							} else if (form.email.value == "") {								alert( "" );							} else {								submitform( pressbutton );							}						}						//-->																																:																																																																																																													:																																																						:																																																						:																																																						:																																																																																																									}				}				?>			

相关资源