- md5
- 399e826206f4901de07441ee15b20fcc
- sha1
- 88a736f6974d231402f0cdc437db5dc108282cae
- sha256
- 3c1d2ea9533aaadde6cc7f7fbee0a6d0b7a0d42c13a8f033a02ff96c4a2b7d7a
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
<?php
/**
* @version $Id: admin.banners.html.php 85 2005-09-15 23:12:03Z eddieajau $
* @package Joomla
* @subpackage Banners
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );
/**
* @package Joomla
* @subpackage Banners
*/
class HTML_banners {
function showBanners( &$rows, &$pageNav, $option ) {
global $my;
mosCommonHTML::loadOverlib();
?>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th>
Banner Manager
</th>
</tr>
</table>
<table class="adminlist">
<tr>
<th width="20">
#
</th>
<th width="20">
<input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $rows ); ?>);" />
</th>
<th align="left" nowrap>
Banner Name
</th>
<th width="10%" nowrap>
Published
</th>
<th width="11%" nowrap>
Impressions Made
</th>
<th width="11%" nowrap>
Impressions Left
</th>
<th width="8%">
Clicks
</th>
<th width="8%" nowrap>
% Clicks
</th>
</tr>
<?php
$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 ? 'Published' : 'Unpublished';
$checked = mosCommonHTML::CheckedOutProcessing( $row, $i );
?>
<tr class="<?php echo "row$k"; ?>">
<td align="center">
<?php echo $pageNav->rowNumber( $i ); ?>
</td>
<td align="center">
<?php echo $checked; ?>
</td>
<td align="left">
<?php
if ( $row->checked_out && ( $row->checked_out != $my->id ) ) {
echo $row->name;
} else {
?>
<a href="<?php echo $link; ?>" title="Edit Banner">
<?php echo $row->name; ?>
</a>
<?php
}
?>
</td>
<td align="center">
<a href="javascript: void(0);" onClick="return listItemTask('cb<?php echo $i;?>','<?php echo $task;?>')">
<img src="images/<?php echo $img;?>" width="12" height="12" border="0" alt="<?php echo $alt; ?>" />
</a>
</td>
<td align="center">
<?php echo $row->impmade;?>
</td>
<td align="center">
<?php echo $impleft;?>
</td>
<td align="center">
<?php echo $row->clicks;?>
</td>
<td align="center">
<?php echo $percentClicks;?>
</td>
</tr>
<?php
$k = 1 - $k;
}
?>
</table>
<?php echo $pageNav->getListFooter(); ?>
<input type="hidden" name="option" value="<?php echo $option; ?>">
<input type="hidden" name="task" value="">
<input type="hidden" name="boxchecked" value="0">
<input type="hidden" name="hidemainmenu" value="0">
</form>
<?php
}
function bannerForm( &$_row, &$lists, $_option ) {
mosMakeHtmlSafe( $_row, ENT_QUOTES, 'custombannercode' );
?>
<script language="javascript">
<!--
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( "You must provide a banner name." );
} else if (getSelectedValue('adminForm','cid') < 1) {
alert( "Please select a client." );
} else if (!getSelectedValue('adminForm','imageurl')) {
alert( "Please select an image." );
} else if (form.clickurl.value == "") {
alert( "Please fill in the URL for the banner." );
} else {
submitform( pressbutton );
}
}
//-->
</script>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th>
Banner:
<small>
<?php echo $_row->cid ? 'Edit' : 'New';?>
</small>
</th>
</tr>
</table>
<table class="adminform">
<tr>
<th colspan="2">
Details
</th>
</tr>
<tr>
<td width="20%">
Banner Name:
</td>
<td width="80%">
<input class="inputbox" type="text" name="name" value="<?php echo $_row->name;?>">
</td>
</tr>
<tr>
<td>
Client Name:
</td>
<td align="left">
<?php echo $lists['cid']; ?>
</td>
</tr>
<tr>
<td>
Impressions Purchased:
</td>
<?php
if ($_row->imptotal == "0") {
$unlimited="checked";
$_row->imptotal="";
} else {
$unlimited = "";
}
?>
<td>
<input class="inputbox" type="text" name="imptotal" size="12" maxlength="11" value="<?php echo $_row->imptotal;?>"> Unlimited <input type="checkbox" name="unlimited" <?php echo $unlimited;?>>
</td>
</tr>
<tr>
<td valign="top">
Banner URL:
</td>
<td align="left">
<?php echo $lists['imageurl']; ?>
</td>
</tr>
<tr>
<td>
Show Banner :
</td>
<td>
<?php echo $lists['showBanner']; ?>
</td>
</tr>
<tr>
<td>
Click URL:
</td>
<td>
<input class="inputbox" type="text" name="clickurl" size="50" maxlength="200" value="<?php echo $_row->clickurl;?>">
</td>
</tr>
<tr>
<td valign="top">
Custom banner code:
</td>
<td>
<textarea class="inputbox" cols="70" rows="5" name="custombannercode"><?php echo $_row->custombannercode;?></textarea>
</td>
</tr>
<tr >
<td valign="top" align="right">
Clicks
<br/>
<input name="reset_hits" type="button" class="button" value="Reset Clicks" onClick="submitbutton('resethits');">
</td>
<td colspan="2">
<?php echo $_row->clicks;?>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td valign="top">
Banner Image:
</td>
<td valign="top">
<?php
if (eregi("swf", $_row->imageurl)) {
?>
<img src="images/blank.png" name="imagelib">
<?php
} elseif (eregi("gif|jpg|png", $_row->imageurl)) {
?>
<img src="../images/banners/<?php echo $_row->imageurl; ?>" name="imagelib">
<?php
} else {
?>
<img src="images/blank.png" name="imagelib">
<?php
}
?>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
</table>
<input type="hidden" name="option" value="<?php echo $_option; ?>">
<input type="hidden" name="bid" value="<?php echo $_row->bid; ?>">
<input type="hidden" name="task" value="">
<input type="hidden" name="impmade" value="<?php echo $_row->impmade; ?>">
</form>
<?php
}
}
/**
* Banner clients
* @package Joomla
*/
class HTML_bannerClient {
function showClients( &$rows, &$pageNav, $option ) {
global $my;
mosCommonHTML::loadOverlib();
?>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th>
Banner Client Manager
</th>
</tr>
</table>
<table class="adminlist">
<tr>
<th width="20">
#
</th>
<th width="20">
<input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $rows ); ?>);" />
</th>
<th align="left" nowrap>
Client Name
</th>
<th align="left" nowrap>
Contact
</th>
<th align="center" nowrap>
No. of Active Banners
</th>
</tr>
<?php
$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 );
?>
<tr class="<?php echo "row$k"; ?>">
<td width="20" align="center">
<?php echo $pageNav->rowNumber( $i ); ?>
</td>
<td width="20">
<?php echo $checked; ?>
</td>
<td width="40%">
<?php
if ( $row->checked_out && ( $row->checked_out != $my->id ) ) {
echo $row->name;
} else {
?>
<a href="<?php echo $link; ?>" title="Edit Banner Client">
<?php echo $row->name; ?>
</a>
<?php
}
?>
</td>
<td width="40%">
<?php echo $row->contact;?>
</td>
<td width="20%" align="center">
<?php echo $row->bid;?>
</td>
</tr>
<?php
$k = 1 - $k;
}
?>
</table>
<?php echo $pageNav->getListFooter(); ?>
<input type="hidden" name="option" value="<?php echo $option; ?>">
<input type="hidden" name="task" value="">
<input type="hidden" name="boxchecked" value="0">
<input type="hidden" name="hidemainmenu" value="0">
</form>
<?php
}
function bannerClientForm( &$row, $option ) {
mosMakeHtmlSafe( $row, ENT_QUOTES, 'extrainfo' );
?>
<script language="javascript">
<!--
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancelclient') {
submitform( pressbutton );
return;
}
// do field validation
if (form.name.value == "") {
alert( "Please fill in the Client Name." );
} else if (form.contact.value == "") {
alert( "Please fill in the Contact Name." );
} else if (form.email.value == "") {
alert( "Please fill in the Contact Email." );
} else {
submitform( pressbutton );
}
}
//-->
</script>
<table class="adminheading">
<tr>
<th>
Banner Client:
<small>
<?php echo $row->cid ? 'Edit' : 'New';?>
</small>
</th>
</tr>
</table>
<form action="index2.php" method="post" name="adminForm">
<table class="adminform">
<tr>
<th colspan="2">
Details
</th>
</tr>
<tr>
<td width="10%">
Client Name:
</td>
<td>
<input class="inputbox" type="text" name="name" size="30" maxlength="60" valign="top" value="<?php echo $row->name; ?>">
</td>
</tr>
<tr>
<td width="10%">
Contact Name:
</td>
<td>
<input class="inputbox" type="text" name="contact" size="30" maxlength="60" value="<?php echo $row->contact; ?>">
</td>
</tr>
<tr>
<td width="10%">
Contact Email:
</td>
<td>
<input class="inputbox" type="text" name="email" size="30" maxlength="60" value="<?php echo $row->email; ?>">
</td>
</tr>
<tr>
<td valign="top">
Extra Info:
</td>
<td>
<textarea class="inputbox" name="extrainfo" cols="60" rows="10"><?php echo str_replace('&','&',$row->extrainfo);?></textarea>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
</table>
<input type="hidden" name="option" value="<?php echo $option; ?>">
<input type="hidden" name="cid" value="<?php echo $row->cid; ?>">
<input type="hidden" name="task" value="">
</form>
<?php
}
}
?>
No other release has this exact content. See every version of this file.