!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/home/mnnews/public_html/phpads/admin/   drwxr-xr-x
Free 3.96 GB of 27.03 GB (14.66%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     zone-probability.php (8.78 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php // $Revision: 1.16 $

/************************************************************************/
/* phpAdsNew 2                                                          */
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2001 by the phpAdsNew developers                       */
/* http://sourceforge.net/projects/phpadsnew                            */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/



// Include required files
require ("config.php");
require (
"lib-statistics.inc.php");
require (
"lib-zones.inc.php");


// Security check
phpAds_checkAccess(phpAds_Admin+phpAds_Affiliate);



/*********************************************************/
/* Affiliate interface security                          */
/*********************************************************/

if (phpAds_isUser(phpAds_Affiliate))
{
    
$result = phpAds_dbQuery("
        SELECT
            affiliateid
        FROM
            "
.$phpAds_config['tbl_zones']."
        WHERE
            zoneid = $zoneid
        "
) or phpAds_sqlDie();
    
$row = phpAds_dbFetchArray($result);
    
    if (
$row["affiliateid"] == '' || phpAds_getUserID() != $row["affiliateid"])
    {
        
phpAds_PageHeader("1");
        
phpAds_Die ($strAccessDenied, $strNotAdmin);
    }
    else
    {
        
$affiliateid = $row["affiliateid"];
    }
}



/*********************************************************/
/* HTML framework                                        */
/*********************************************************/

$res = phpAds_dbQuery("
    SELECT
        *
    FROM
        "
.$phpAds_config['tbl_zones']."
    WHERE
        affiliateid = "
.$affiliateid."
"
);

while (
$row = phpAds_dbFetchArray($res))
{
    
phpAds_PageContext (
        
phpAds_buildZoneName ($row['zoneid'], $row['zonename']),
        
"zone-probability.php?affiliateid=".$affiliateid."&zoneid=".$row['zoneid'],
        
$zoneid == $row['zoneid']
    );
}

if (
phpAds_isUser(phpAds_Admin))
{
    
phpAds_PageShortcut($strAffiliateProperties, 'affiliate-edit.php?affiliateid='.$affiliateid, 'images/icon-affiliate.gif');
    
phpAds_PageShortcut($strZoneHistory, 'stats-zone-history.php?affiliateid='.$affiliateid.'&zoneid='.$zoneid, 'images/icon-statistics.gif');
    
    
    
$extra  = "<form action='zone-modify.php'>";
    
$extra .= "<input type='hidden' name='zoneid' value='$zoneid'>";
    
$extra .= "<input type='hidden' name='affiliateid' value='$affiliateid'>";
    
$extra .= "<input type='hidden' name='returnurl' value='zone-probability.php'>";
    
$extra .= "<br><br>";
    
$extra .= "<b>$strModifyZone</b><br>";
    
$extra .= "<img src='images/break.gif' height='1' width='160' vspace='4'><br>";
    
$extra .= "<img src='images/icon-move-zone.gif' align='absmiddle'>&nbsp;$strMoveTo<br>";
    
$extra .= "<img src='images/spacer.gif' height='1' width='160' vspace='2'><br>";
    
$extra .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
    
$extra .= "<select name='moveto' style='width: 110;'>";
    
    
$res = phpAds_dbQuery("SELECT * FROM ".$phpAds_config['tbl_affiliates']." WHERE affiliateid != ".$affiliateid) or phpAds_sqlDie();
    while (
$row = phpAds_dbFetchArray($res))
        
$extra .= "<option value='".$row['affiliateid']."'>".phpAds_buildAffiliateName($row['affiliateid'], $row['name'])."</option>";
    
    
$extra .= "</select>&nbsp;<input type='image' src='images/".$phpAds_TextDirection."/go_blue.gif'><br>";
    
$extra .= "<img src='images/break.gif' height='1' width='160' vspace='4'><br>";
    
$extra .= "<img src='images/icon-recycle.gif' align='absmiddle'>&nbsp;<a href='zone-delete.php?affiliateid=$affiliateid&zoneid=$zoneid&returnurl=zone-index.php'".phpAds_DelConfirm($strConfirmDeleteZone).">$strDelete</a><br>";
    
$extra .= "</form>";
    
    
    
phpAds_PageHeader("4.2.3.4", $extra);
        echo
"<img src='images/icon-affiliate.gif' align='absmiddle'>&nbsp;".phpAds_getAffiliateName($affiliateid);
        echo
"&nbsp;<img src='images/".$phpAds_TextDirection."/caret-rs.gif'>&nbsp;";
        echo
"<img src='images/icon-zone.gif' align='absmiddle'>&nbsp;<b>".phpAds_getZoneName($zoneid)."</b><br><br><br>";
        
phpAds_ShowSections(array("4.2.3.2", "4.2.3.3", "4.2.3.4", "4.2.3.5"));
}
else
{
    if (
phpAds_isAllowed(phpAds_EditZone)) $sections[] = "2.1.2";
    if (
phpAds_isAllowed(phpAds_LinkBanners)) $sections[] = "2.1.3";
    
$sections[] = "2.1.4";
    
$sections[] = "2.1.5";
        
    
phpAds_PageHeader("2.1.4");
        echo
"<img src='images/icon-affiliate.gif' align='absmiddle'>&nbsp;".phpAds_getAffiliateName($affiliateid);
        echo
"&nbsp;<img src='images/".$phpAds_TextDirection."/caret-rs.gif'>&nbsp;";
        echo
"<img src='images/icon-zone.gif' align='absmiddle'>&nbsp;<b>".phpAds_getZoneName($zoneid)."</b><br><br><br>";
        
phpAds_ShowSections($sections);
}



/*********************************************************/
/* Main code                                             */
/*********************************************************/

function phpAds_showZoneBanners ($zoneid)
{
    global
$phpAds_config;
    global
$strUntitled, $strName, $strID, $strWeight;
    global
$strCampaignWeight, $strBannerWeight, $strProbability;
    
    
// Get zone
    
$zoneres = phpAds_dbQuery("SELECT * FROM ".$phpAds_config['tbl_zones']." WHERE zoneid='$zoneid' ");
    
    if (
phpAds_dbNumRows($zoneres) > 0)
    {
        
$zone = phpAds_dbFetchArray($zoneres);
        
        
// Set what parameter to zone settings
        
if (isset($zone['what']) && $zone['what'] != '')
            
$what = $zone['what'];
        else
            
$what = '';
    }
    else
        
$what = '';
    
    
    
$precondition = '';
    
    
// Size preconditions
    
if ($zone['width'] > -1)
        
$precondition .= " AND ".$phpAds_config['tbl_banners'].".width = ".$zone['width']." ";
    
    if (
$zone['height'] > -1)
        
$precondition .= " AND ".$phpAds_config['tbl_banners'].".height = ".$zone['height']." ";
    
    
    
$select = phpAds_buildQuery ($what, 1, $precondition);
    
$res    = phpAds_dbQuery($select);
    
    
$rows = array();
    
$prioritysum = 0;
    while (
$tmprow = phpAds_dbFetchArray($res))
    {
        
// weight of 0 disables the banner
        
if ($tmprow['priority'])
        {
            
$prioritysum += $tmprow['priority'];
            
$rows[$tmprow['bannerid']] = $tmprow;
        }
    }
    
    if (
is_array($rows))
    {
        
$i=0;
        
        
// Header
        
echo "<table width='100%' border='0' align='center' cellspacing='0' cellpadding='0'>";
        echo
"<tr height='25'>";
        echo
"<td height='25' width='40%'><b>&nbsp;&nbsp;".$strName."</b></td>";
        echo
"<td height='25'><b>".$strID."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></td>";
        echo
"<td height='25'><b>".$strProbability."</b></td>";
        echo
"</tr>";
        
        echo
"<tr height='1'><td colspan='3' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
        
        
// Banners
        
for (reset($rows);$key=key($rows);next($rows))
        {
            
$name = phpAds_getBannerName ($rows[$key]['bannerid'], 60, false);
            
            if (
$i > 0) echo "<tr height='1'><td colspan='3' bgcolor='#888888'><img src='images/break-l.gif' height='1' width='100%'></td></tr>";
            
            echo
"<tr height='25' ".($i%2==0?"bgcolor='#F6F6F6'":"").">";
            
            echo
"<td height='25'>";
            echo
"&nbsp;&nbsp;";
            
            
// Banner icon
            
if ($rows[$key]['storagetype'] == 'html')
                echo
"<img src='images/icon-banner-html.gif' align='absmiddle'>&nbsp;";
            elseif (
$rows[$key]['storagetype'] == 'url')
                echo
"<img src='images/icon-banner-url.gif' align='absmiddle'>&nbsp;";
            else
                echo
"<img src='images/icon-banner-stored.gif' align='absmiddle'>&nbsp;";
            
            
// Name
            
echo $name;
            echo
"</td>";
            
            echo
"<td height='25'>".$rows[$key]['bannerid']."</td>";
            echo
"<td height='25'>".number_format($rows[$key]['priority'] / $prioritysum * 100, $phpAds_config['percentage_decimals'])."%</td>";
            
            echo
"</tr>";
            
$i++;
        }
        
        
// Footer
        
echo "<tr height='1'><td colspan='3' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
        echo
"</table>";
    }
}





/*********************************************************/
/* Main code                                             */
/*********************************************************/

if (isset($zoneid) && $zoneid != '')
{
    
$res = phpAds_dbQuery("
        SELECT
            *
        FROM
            "
.$phpAds_config['tbl_zones']."
        WHERE
            zoneid = $zoneid
        "
) or phpAds_sqlDie();
    
    if (
phpAds_dbNumRows($res))
    {
        
$zone = phpAds_dbFetchArray($res);
    }
}



echo
"<br><br>";

phpAds_showZoneBanners($zoneid);

echo
"<br><br>";



/*********************************************************/
/* HTML framework                                        */
/*********************************************************/

phpAds_PageFooter();

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0042 ]--