首 页   · 站长博客 · 用户注册 · 会员登陆  · 会员排行  ·最新主题  ·最近回复  精华区  版权声明  ·论坛管理
  当前登录身份:游客,请先登录。  笔名: 口令: 验证码:   
楼 主  index »  PHP与模板与代码加密/优化 » [原创]超级HELP!!!  


  作者:entsee
  注册时间:2004-11-02
  主题/回复:1/1
  积分:406
  等级:★★☆(五级)
  称号:略有小成

  sdafasd@dsf.com
  未提供
  www.ourmv.com

 

 发表:2004-11-02 16:10:25 阅读 2438 次 回复 3 次 得分3  |   字号 字色
[原创]超级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,我在这谢谢了!
 
 1#楼  
 
  回复人:一起PHP
  注册时间:2004-02-27
  主题/回复:247/1521
  积分:4649
  等级:★★★★★☆(十一级)
  称号:论坛圣人

   
 1#楼 发表于2004-11-03 03:21:08  评分:1 

代码太长,且不全面,不好办
最好把要求再明确一下,问题在具体一下
 2#楼  
 
  回复人:entsee
  注册时间:2004-11-02
  主题/回复:1/1
  积分:406
  等级:★★☆(五级)
  称号:略有小成

   
 2#楼 发表于2004-11-04 01:13:14  评分:× 

只是去掉程序的会员系统,不要登录也能在线收看MTV和下载MTV

http://www.ourmv.com/mv/kr/index.php

 3#楼  
 
  回复人:Miyahoo
  注册时间:2004-04-04
  主题/回复:39/255
  积分:1210
  等级:★★★☆(七级)
  称号:论坛贤士

   
 3#楼 发表于2004-11-05 05:48:15  评分:1 

没细看,这些代码里边应该有判断用户登陆的function,你到显示内容的页面把那些检查用户登陆的function调用去掉就好了。
  页数1/1首页 « 1 » 末页
  发表回复:您还没有登陆,无法发表回复。请先[登陆]

一起PHP技术联盟 主办:一起PHP 联系方式:站长QQ:4304410 QQ群:8423742 20159565 站长博客 E-mail: nqp@nqp.me 执行时间:0.02sec
SimsmaBBS 2008 (v6.0) Developed by 17php.com,Copyright(C)2003-2010 All rights reserved. 副本授权:一起PHP官方专用版