📄 template1.php
字号:
<?php
include_once "myconnect.php";
include_once "session.php";
include_once "styles.php";
include_once "left_mem.php";
include_once "date_time_format.php";
$config=mysql_fetch_array(mysql_query("select * from sbbleads_config "));
//======================code here is equivalent to chron file code=============================
mysql_query("update sbbleads_members set sb_memtype=".$config["sb_memtype"]." where sb_expiry_date < NOW()");
//==============================update stats===================================================
$sql="Update sbbleads_stats set sb_hits_thismonth=sb_hits_thismonth+1,sb_hits=sb_hits+1" ;
mysql_query($sql);
$sql="Select * from sbbleads_stats " ;
$rs0_query=mysql_query($sql);
$rs0=mysql_fetch_array($rs0_query);
if (!((date("m",time())==$rs0["sb_thismonth"])) )
{
$sql="Update sbbleads_stats set sb_hits_lastmonth=sb_hits_thismonth,
sb_thismonth=".date("m",time()) ;
mysql_query($sql);
$sql="Update sb_bleads_stats set sb_hits_thismonth=0" ;
mysql_query($sql);
}
//=============================================================================================
//include_once "check_msg_function.php";
///////////////////////////////////////////////////////////////////////////////
/// THE CODE OF THIS SCRIPT HAS BEEN DEVELOPED BY SOFTBIZ SOLUTIONS /////
/// AND IS MEANT TO BE USED ON THIS SITE ONLY AND IS NOT FOR REUSE, /////
/// RESALE OR REDISTRIBUTION. /////
/// IF YOU NOTICE ANY VIOLATION OF ABOVE PLEASE REPORT AT: /////
/// admin@softbizscripts.com /////
/// http://www.softbizscripts.com /////
/// http://www.softbizsolutions.com /////
///////////////////////////////////////////////////////////////////////////////
// LOAD style number from the config file
$icons=mysql_fetch_array(mysql_query("select * from sbbleads_icons where sb_id=".$config["sb_icon_list"]));
$keyword="";
if(isset($_REQUEST["keyword"])&&($_REQUEST["keyword"]<>""))
{
$keyword=$_REQUEST["keyword"];
}
$option=1;
if(isset($_REQUEST["option"])&&($_REQUEST["option"]<>""))
{
$option=$_REQUEST["option"];
}
?><html>
<head>
<title><? echo $config["sb_site_name"];?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function sb_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body bgcolor="<?php echo $softbiz_page_bg; ?>" leftmargin="1" topmargin="1" rightmargin="1">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left">
<td valign="top" ><div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<!--<img src="admin/sbbleads_icons/<? echo $config["sb_logo"];?>">-->
<img src="images/logo.gif" width="199" height="87"></td>
<td align="center">
<?php
mt_srand( (double)microtime() * 1000000);
$rs_t_query=mysql_query("select * from sbbleads_ads where approved= 'yes' and credits > displays");
//die($rs_t_query);
$cnt= mysql_num_rows($rs_t_query);
$rs_t_query1=mysql_query("select * from sbbleads_affiliate_banner where sbaff_active= 'yes'");
//die($rs_t_query);
$cnt2 = mysql_num_rows($rs_t_query1);
$sbdowhat=0; //stands for do nothing
if ( ($cnt == 0) && ($cnt2 > 0) )
{ //no banner but affiliate exists
$sbdowhat=1; /// stands for "affiliate";
}
elseif( ($cnt > 0) && ($cnt2 == 0) )
{ //no affiliate but banner exists
$sbdowhat=2; // stands for "banner";
}
elseif( ($cnt > 0) && ($cnt2 > 0) )
{ //
$sbrandon=mt_rand(1,2);
if($sbrandon == 1)
$sbdowhat=1;
else
$sbdowhat=2;
}
if($sbdowhat == 1)
{
$rnum= mt_rand(1,$cnt2);
for ($i=0;$i<$rnum;$i++)
$rs_t=mysql_fetch_array($rs_t_query1);
echo $rs_t["sbaff_text"];
}
elseif($sbdowhat == 2)
{
$rnum= mt_rand(1,$cnt);
for ($i=0;$i<$rnum;$i++)
$rs_t=mysql_fetch_array($rs_t_query);
$id=$rs_t["id"];
$sbtitle=$rs_t["sbtitle"];
$url=$rs_t["url"];
$bannerurl=$rs_t["bannerurl"];
echo "<a href='$url' target=\"_blank\"><img src='$bannerurl' width=468 height=60 border=0 alt=\"$sbtitle\"></a>";
mysql_query("update sbbleads_ads set displays=displays+1 where id=$id");
}
?>
</td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td width="100%" height="100%" align="center" valign="top" > <table width="100%" border="0" cellspacing="0" cellpadding="0">
<form action="index.php" method="get">
</form>
<tr>
<td height="25" align="center" valign="bottom"><table width="95%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="center">
<td height="25" class="<?php
if(!preg_match("/\/index.php/",$_SERVER['SCRIPT_NAME']))
{ echo "inactivetab";}
else
{ echo "activetab"; }
?>
">
<?php
if(!preg_match("/\/index.php/",$_SERVER['SCRIPT_NAME']))
{
?>
<a href="index.php" >Home</a>
<?php
}
else
{
echo "HOME";
}
?>
</td>
<td width="7" > </td>
<td height="25" class="<?php
if(!preg_match("/\/selloffers.php/",$_SERVER['SCRIPT_NAME']))
{ echo "inactivetab";}
else
{ echo "activetab"; }
?>
">
<?php
if(!preg_match("/\/selloffers.php/",$_SERVER['SCRIPT_NAME']))
{
?>
<a href="selloffers.php" >Sell Offers</a>
<?php
}
else
{
echo "SELL OFFERS";
}
?>
</td>
<td width="7" > </td>
<td height="25" class="<?php
if(!preg_match("/\/buyoffers.php/",$_SERVER['SCRIPT_NAME']))
{ echo "inactivetab";}
else
{ echo "activetab"; }
?>
">
<?php
if(!preg_match("/\/buyoffers.php/",$_SERVER['SCRIPT_NAME']))
{
?>
<a href="buyoffers.php" >Buy Offers</a>
<?php
}
else
{
echo "BUY OFFERS";
}
?>
</td>
<td width="7" > </td>
<td height="25" class="<?php
if(!preg_match("/\/products.php/",$_SERVER['SCRIPT_NAME']))
{ echo "inactivetab";}
else
{ echo "activetab"; }
?>
">
<?php
if(!preg_match("/\/products.php/",$_SERVER['SCRIPT_NAME']))
{
?>
<a href="products.php" >Products</a>
<?php
}
else
{
echo "PRODUCTS";
}
?>
</td>
<td width="7" > </td>
<td height="25" class="<?php
if(!preg_match("/\/profiles.php/",$_SERVER['SCRIPT_NAME']))
{ echo "inactivetab";}
else
{ echo "activetab"; }
?>
">
<?php
if(!preg_match("/\/profiles.php/",$_SERVER['SCRIPT_NAME']))
{
?>
<a href="profiles.php">Companies</a>
<?php
}
else
{
echo "COMPANIES";
}
?>
</td>
<td width="7" > </td>
<td height="25" class="<?php
if(!preg_match("/\/cart_items.php/",$_SERVER['SCRIPT_NAME']))
{ echo "inactivetab";}
else
{ echo "activetab"; }
?>
">
<?php
if(!preg_match("/\/cart_items.php/",$_SERVER['SCRIPT_NAME']))
{
?>
<a href="cart_items.php">Inquiry Basket</a>
<?php
}
else
{
echo "INQUIRY BASKET";
}
?>
</td>
<td width="7" > </td>
<td class="<?php
if(isset($_SESSION["sbbleads_userid"]))
{
if(!preg_match("/\/userhome.php/",$_SERVER['SCRIPT_NAME']))
{ echo "inactivetab"; }
else
{ echo "activetab"; }
}
else
{
if(!preg_match("/\/signin.php/",$_SERVER['SCRIPT_NAME']))
{ echo "inactivetab"; }
else
{ echo "activetab"; }
}
?>
">
<?php
if(isset($_SESSION["sbbleads_userid"]))
{
if(!preg_match("/\/userhome.php/",$_SERVER['SCRIPT_NAME']))
{
?>
<a href="userhome.php" >Member Home</a>
<?php
}
else
{
echo "MEMBER HOME";
}
}
else
{
if(!preg_match("/\/signin.php/",$_SERVER['SCRIPT_NAME']))
{
?>
<a href="signin.php" >Login</a>
<?php
}
else
{
echo "LOGIN";
}
}
?>
</td>
<td width="7" > </td>
<td width="80" class="<?php
if(!preg_match("/\/stats.php/",$_SERVER['SCRIPT_NAME']))
{ echo "inactivetab";}
else
{ echo "activetab"; }
?>
">
<?php
if(!preg_match("/\/stats.php/",$_SERVER['SCRIPT_NAME']))
{
?>
<a href="stats.php" >Stats</a>
<?php
}
else
{
echo "STATS";
}
?>
</td>
<td width="7" > </td>
<td class="<?php
if(!preg_match("/\/linktous.php/",$_SERVER['SCRIPT_NAME']))
{ echo "inactivetab";}
else
{ echo "activetab"; }
?>
" width="80">
<?php
if(!preg_match("/\/linktous.php/",$_SERVER['SCRIPT_NAME']))
{
?>
<a href="linktous.php" >Contact Us</a>
<?php
}
else
{
echo "CONTACT US";
}
?>
</td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr height=20>
<td colspan="3" class="sidetitle" align="right"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="sidetitle" >
<tr>
<td> <? echo sb_date(time());?></td>
<td align="right">
<?
if(isset($_SESSION["sbbleads_userid"])) {
echo "Logged in as <b>" . $_SESSION["sbbleads_username"] . "</b>" ;
?>
| <a href="logout.php" class="titlelink">LOGOUT</a>
<?
}
else
{
?>
<font size=1>Welcome <strong>Guest</strong>,
Please <a href="signin.php" class="titlelink">LOGIN</a>
to your account or <a href="signup.php"class="titlelink">SIGNUP</a>
with us for business opportunities</font>
<?
}
?>
</td>
</tr>
</table></td>
</tr>
<tr class="mainbgcolor" >
<td align="center" valign="middle"> <font face="verdana, arial" size="1" class='red'>
<?
if ( isset($_REQUEST["msg"])&&$_REQUEST['msg']<>"")
{
print($_REQUEST['msg']);
}
//end if
?>
</font> </td>
</tr>
<tr valign="top" width=100%>
<td class="mainbgcolor" > <div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="150" align="left">
<? left();?>
</td>
<td align="center">
<?php main();?>
</td>
</tr>
</table>
</div></td>
</tr>
<!--<tr height=2>
<td colspan="3" class="seperatorstyle" ></td>
</tr>-->
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="top" > <table align="center" width="100%" cellpadding="2" cellspacing="0" class="bottomstyle">
<tr>
<td align="center"> <a href="index.php" class="bottomlink">HOME</a>
| <a href="selloffers.php" class="bottomlink">SELL OFFERS</a> | <a href="buyoffers.php" class="bottomlink">BUY
OFFERS</a> | <a href="products.php" class="bottomlink">PRODUCTS</a>
| <a href="profiles.php" class="bottomlink">COMPANIES</a> |
<?php
if(!isset($_SESSION["sbbleads_userid"]))
{?>
<a href="signin.php" class="bottomlink">LOGIN</a>
<?php
}
else
{
?>
<a href="userhome.php" class="bottomlink">MEMBER AREA</a>
<?
}?>
| <a href="cart_items.php" class="bottomlink">INQUIRY BASKET</a> |
<a href="linktous.php" class="bottomlink">CONTACT US</a> <br> <a href="post_offer.php" class="bottomlink">POST
SELL OFFERS</a> | <a href="post_offer_buy.php" class="bottomlink">POST
BUY OFFERS</a> | <a href="post_product.php" class="bottomlink">POST
PRODUCTS</a> | <a href="show_messages.php" class="bottomlink">CHECK
INQUIRIES</a> | <a href="manage_search.php" class="bottomlink">MY
SEARCHES</a> | <a href="manage_favorites.php" class="bottomlink">MY
FAVORITES</a> | <a href="choose_membership.php" class="bottomlink">UPGRADE
MEMBERSHIP</a><br> <a href="terms.php" target="_blank" class="bottomlink">TERMS
OF USE</a> | <a href="privacy.php" target="_blank" class="bottomlink">PRIVACY
POLICY</a> | <a href="legal.php" target="_blank" class="bottomlink">LEGAL
POLICY</a> </td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" ><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><font size="1">Powered
by SoftbizScripts</font></font></div></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -