[原创]超级HELP!!! |
我朋友帮我编一个PHP程序,是一个MTV程序来的,有会员系统来的,可是现在我不想要会员系统,希望在线视听MTV和下载MTV不是会员也可下载,找来找去,好像index有调用bin.php文件,可是我不知怎么修改才能去掉会员系统,请高手帮忙,现在附上bin.php的代码
<?
$Cfg[Main][Host] = 'localhost';
$Cfg[Main][Database] = '********';
$Cfg[Main][User] = '********';
$Cfg[Main][Password] = '********';
$width = 97;
$height = 54;
function managerCheck($code){
global $uUID, $uSession;
session_start();
if(!$uUID || !$uSession){
eMsg('登录超时', '对不起, 你尚未登录或登录已经超时, 请重新登录.');
}
$dbc = new dbc;
$cq = 'SELECT a.* FROM member a, manager b WHERE a.uid='.$uUID.' AND a.session="'.$uSession.'" AND a.uid=b.uid AND b.manager_code='.$code;
$dbc->query($cq, 'Main');
if($dbc->affectedRows() <= 0){
eMsg('登录超时', '对不起, 你尚未登录或登录已经超时, 请重新登录.');
}
$dbc->nextRecord();
$centerInfo = $dbc->fArray();
$GLOBALS[centerInfo] = $centerInfo;
}
function centerCheck(){
global $uUID, $uSession;
session_start();
if(!$uUID || !$uSession){
eMsg('登录超时', '对不起, 你尚未登录或登录已经超时, 请重新登录. <a href="./member/logon.php">从这登录</a>');
}
$dbc = new dbc;
$cq = 'SELECT * FROM member WHERE uid='.$uUID.' AND session="'.$uSession.'"';
$dbc->query($cq, 'Main');
if($dbc->affectedRows() <= 0){
eMsg('登录超时', '对不起, 你尚未登录或登录已经超时, 请重新登录.');
}
$dbc->nextRecord();
$centerInfo = $dbc->fArray();
$GLOBALS[centerInfo] = $centerInfo;
}
function loginCheck(){
global $uUID, $uSession;
session_start();
if(!$uUID || !$uSession){
session_unregister('uUID');
session_unregister('uSession');
return;
}
$dbc = new dbc;
$cq = 'SELECT * FROM member WHERE uid='.$uUID.' AND session="'.$uSession.'"';
$dbc->query($cq, 'Main');
if($dbc->affectedRows() <= 0){
session_unregister('uUID');
session_unregister('uSession');
return;
}
$dbc->nextRecord();
$centerInfo = $dbc->fArray();
$GLOBALS[centerInfo] = $centerInfo;
return 1;
}
function landHtmlTop($Title = '', $style = '', $script = '', $head = ''){
if($Title){
$Title = $Title.' - 韩国音乐电视-OURMV.COM';
}else{
$Title = '韩国音乐电视-OURMV.COM';
}
?>
<html>
<head>
<title><?echo $Title ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body, table { font-size: 12px}
input,select,textarea,select,checkbox { font-size: 12px}
a { color: #0000FF; text-decoration: none}
a:hover { color: #FF0000; text-decoration: underline}
.showhand {cursor: pointer; cursor: hand}
.none { font-size: 12px}
.font14 { font-size: 14px}
.font16 { font-size: 16px}
.black { color: #000000}
.black a { color: #000000}
.black a:hover { color: #000000}
.white { color: #FFFFFF}
.white a { color: #FFFFFF}
.white a:hover { color: #FFFFFF}
<?echo $style;?>
//-->
</style>
<?
if($script){
?>
<script type="text/javascript" language="javascript">
<!--
<?echo $script;?>
//-->
</script>
<?
}
?>
<?echo $head;?>
</head>
<?
}
function aMsg($Msg, $nGo=-1){
echo "<META HTTP-EQUIV='content-type' CONTENT='text/html; charset=GB2312'>";
echo "<Script>alert('$Msg');</Script>";
if($nGo != -1) echo "<Script>location = '$nGo';</Script>";else echo "<Script>window.history.back();</Script>";
exit;
}
function eMsg($title, $message){
echo $message;
exit;
}
class dbc
{
var $UseDbId = 0;
var $Host = 0;
var $Database = 1;
var $User = 1;
var $Password = 1;
var $AutoFree = 0;
var $Debug = 0;
var $Record = array();
var $Row = 0;
var $LinkID = 0;
var $QueryID = 0;
function setDebug($isDebug){
$this->Debug=$isDebug;
}
function query($QueryString,$UseDbId = 0){
if(!$QueryString)return 0;
if(!$this->connect( $UseDbId ))return 0;
if($this->QueryID)$this->free();
if($this->Debug)printf("调试信息:query = %s 使用的库Id为 %s <br>\n", $QueryString,$UseDbId);
$this->QueryID = @mysql_query($QueryString,$this->LinkID);
$this->Row = 0;
return $this->QueryID;
}
function nextRecord(){
if(!$this->QueryID)return 0;
$this->Record = @mysql_fetch_array($this->QueryID);
$this->Row += 1;
$stat = is_array($this->Record);
if(!$stat && $this->AutoFree)$this->free();
return $stat;
}
function autoID(){
return mysql_insert_id($this->LinkID);
}
function f($Name){
return $this->Record[$Name];
}
function p($Name){
print $this->Record[$Name];
}
function fArray()
{
return $this->Record;
}
function fAll(){
$this->seek(0);
$NumRows = $this->numRows();
for($i = 0 ; $i < $NumRows ; $i++){
$this->nextRecord();
$AllRecord[$i] = $this->Record;
}
return $AllRecord;
}
function numRows(){
return @mysql_num_rows($this->QueryID);
}
function nf(){
return $this->numRows();
}
function np(){
print $this->numRows();
}
function affectedRows(){
return @mysql_affected_rows($this->LinkID);
}
function seek($pos = 0){
$status = @mysql_data_seek($this->QueryID, $pos);
if($status)$this->Row = $pos;
else{
@mysql_data_seek($this->QueryID, $this->numRows());
$this->Row = $this->numRows();
return 0;
}
return 1;
}
function free(){
@mysql_free_result($this->QueryID);
$this->QueryID = 0;
}
function dbSql($query = ''){
$this->query($query);
}
function LinkID(){
return $this->LinkID;
}
function useDbId(){
return $this->UseDbId;
}
function QueryID(){
return $this->QueryID;
}
function connect($UseDbId = '0' , $Host = '' ,$Database = '' , $User = '', $Password = ''){
if($UseDbId == '0'){
$Database = $this->Database;
$Host = $this->Host;
$User = $this->User;
$Password = $this->Password;
}elseif($UseDbId != '-1'){
$Database = $GLOBALS[Cfg][$UseDbId][Database];
$Host = $GLOBALS[Cfg][$UseDbId][Host];
$User = $GLOBALS[Cfg][$UseDbId][User];
$Password = $GLOBALS[Cfg][$UseDbId][Password];
}
if( 0 == $this->LinkID || $UseDbId != $this->UseDbId ){
$this->LinkID = @mysql_connect($Host, $User, $Password);
if(!$this->LinkID){
eMsg('数据库链接',"主机 $Host, 数据库 $Database, 用户名 $User, 密码 *** 四者之一有错。");
}
if(!@mysql_select_db($Database,$this->LinkID)){
eMsg('数据库链接','找不到存放数据的数据库,请与管理员联系。');
}
}
return $this->LinkID;
}
function num_fields(){
return @mysql_num_fields($this->QueryID);
}
}
?>
请高手帮忙看一看,教我怎么去掉会员系统,让不是会员的也可在线视听MV和下载MV,我在这谢谢了! |
|
|