• User

    In che modo si cambia la patch a questi script..grazie

    **Vorrei capire questo dilemma in cosa consiste,cambiare la patch:x

    **CIAO A TUTTI:Sto modificando tutti gli script php e fino a qui va bene ,solo che ora sono un po in difficolta ,in questo senso:mi dice di:
    ** gold_vars.php - change the physical path of the gold membership folder to your actual path. Currently it is set as /home/netprofi/public_html/paidmail/gold_membership
    (questo e' lo script gold_vars.php)
    <?
    //include("../includes/vars.php");

       //paths to folders
      **** $gold_url="http://www.miosito.com/paidmail/gold_membership"; 
    

    //virtual path of the site folder
    $gold_path="/home/e-mailc/public_html/paidmail/gold_membership";
    //physical path of the site folder $sitepath

       $gold_admin_url="$gold_url/admin";
       $gold_image_url="$gold_url/images";
    
       $gold_html_path="$gold_path/html";
    
    
       $from_email_id_for_regn="advertising\@merc.netsons.org";
    
       $gold_email_regn_subject="Gold Membership Purchased"; //Member Registeration email message subject
       $email_subject_gold_member_regn = "Gold Membership Purchased";
    

    //##########DO Not Edit Anything Below This##############

        $gold_EmailId=Array();
        $gold_Info=Array();
        $gold_Date=Array();
    

    ?>

    **poi mi dice:

    **global.php - This file is found in the Includes folder. Change the path of the vars.php and vars_arrays.php files, which are found in the Includes folder. The 2 lines that you need to modify are:
    include("/home/netprofi/public_html/paidmail/includes/vars.php"); include("/home/netprofi/public_html/paidmail/includes/vars_arrays.php");

    (questi sono gli altri 3 script)
    global.php
    **<?php

      include("/home/e-mailc/public_html/paidmail/includes/vars.php");
    
      include("/home/e-mailc/public_html/paidmail/includes/vars_arrays.php");
    
    
    
      if(file_exists("$include_path/vars_misc.php")) { include ("$include_path/vars_misc.php");}
    
      if(file_exists("$include_path/vars_commission.php")) { include ("$include_path/vars_commission.php");}
    
    
    
     //function to establish a connection to MySQL and selecting a database to work
    
      function dbconnect()
    
      {
    
         global $siteadds,$dbhost,$dbname,$dbuser,$dbpwd;
    
     if($link = mysql_connect($dbhost,$dbuser,$dbpwd))
    
         {
    
            $res=mysql_select_db($dbname) or die(mysql_error());
    
        if($res)
    
               return $link;
    
         }
    
         else
    
            print "There is some internal error in retrieving the records. Sorry for the inconvinence.";
    
      }
    
    
    
      //function  to close the opened link
    
      function dbclose($link)
    
      {
    
         global $link;
    
         if(mysql_close($link))
    
         {}
    
      }
    
    
    
      //function to reader contents of a file
    
      function file_reader($fileurl)
    
      {
    
         $file=fopen($fileurl,'r') or die("File Does'nt Exists");
    
         if (filesize($fileurl) > 0 )
    
     {
    
            $contents=fread($file,filesize($fileurl));
    
            fclose($file);
    
            return $contents;
    
         }
    
      }
    
    
    
      //function to write contents in a file
    
      function file_writer($fileurl,$contents)
    
      {
    
        $file=@fopen($fileurl,'w') or die("$fileurl File Does'nt Exists");
    
        if($contents) 
    
    {
    
           if(@fwrite($file,$contents)) 
    
           {
    
              fclose($file);
    
              return true;
    
           }
    
    }
    
      }
    
    
    
      //function to get the member id
    
      function get_mem_id($email_id)
    
      {
    
         $SQL="SELECT mem_id from member_details where email_id='$email_id' ";
    
         if($res=mysql_query($SQL))
    
     {
    
            $mem_data=mysql_fetch_array($res);
    
            return $mem_data[0];
    
     }
    
      }
    
    
    
      //function to print a text message
    
      function out_message($message,$font_color)
    
      {
    
         global $sitename,$site_html_path;
    
    
    
         $file_content=file_reader("$site_html_path/outfile.html");
    
         $file_content = str_replace("[sitename]",$sitename,$file_content);
    
         $file_content = str_replace("[MESSAGE]",$message,$file_content);
    
         $file_content = str_replace("",$font_color,$file_content);
    
         print $file_content;
    
      }
    
    
    
      //function to display the links, banners & header information
    
      function links()
    
      {
    
         global $html_header,$site_html_path,$sitename,$site_url,$refid,$email,$ps;
    
    
    
         //DB connectivity
    
         $link=dbconnect();
    
    
    
         $query1="select * from banner";
    
         if($result=mysql_query($query1))
    
        $num=mysql_num_rows($result);
    
    
    
         $chk="false";
    
         $query2="select b.clicks, sum(bi.count) from banner b, banner_imp bi where b.banner_id=bi.banner_id group by b.banner_id ";
    
         if($res=mysql_query($query2))
    
         {
    
        while($result=mysql_fetch_array($res))
    
        {
    
           if($result[0]==$result[1])
    
           {
    
              $chk="true";
    
          continue;
    
           }
    
           else
    
           {
    
              $chk="false";
    
          break;
    
           }
    
        }
    
         }
    
         if (($num > 0 ) && ($chk=="false"))
    
         {
    
        $flag=0;
    
        while(!$flag)
    
        {
    
           $banused=0;
    
           $qry="select * from banner order by rand()";
    
           if($res=mysql_query($qry))
    
           {
    
          $res1=mysql_fetch_array($res);
    
                 $qry1="select * from banner_imp where banner_id=$res1[banner_id]";
    
          if($rs=mysql_query($qry1))
    
              {
    
             while($rs1=mysql_fetch_array($rs))
    
            $banused+=$rs1[count];
    
             if ($banused<$res1[clicks])    
    
                 {
    
                $flag=1;
    
            $output=<<<HTM
    
            <center>
    
            $res1[html]
    
            </center>
    

    HTM;

            $query1="select * from banner_imp where banner_id=$res1[banner_id] and click_date=now()";
    
            if($result=mysql_query($query1))
    
            {
    
                 if($result=mysql_fetch_array($result))
    
               {
    
                  $cnt=$result[count]+1;
    
                  $query="update banner_imp set count=$cnt where banner_id=$res1[banner_id] and click_date=now()";
    
                      mysql_query($query);
    
               }
    
               else
    
               {
    
                           $query="insert into banner_imp set banner_id=$res1[banner_id] , count=1, click_date=now()";
    
                      mysql_query($query);
    
               }
    
            }
    
             }
    
          }
    
           }
    
        }
    
         }
    
         //to open the header page
    
         $html_header=str_replace("[pageheader]",$sitename,$html_header);
    
         $html_header=str_replace("[site_url]",$site_url,$html_header);
    
         $html_header=str_replace("[refid]",$refid,$html_header);
    
         $html_header=str_replace("[email]",$email,$html_header);
    
         $html_header=str_replace("[ps]",$ps,$html_header);
    
         $html_header=str_replace("[ban]",$output,$html_header);
    
         print $html_header;
    
      }
    
    
    
      //function used for sending mails to subscribers.it accept 3 parameter
    
      function send_mail($mailid,$fromid,$sub,$msg)
    
      {
    
         //$headers  = "MIME-Version: 1.0\r\n";
    
         $headers = "Content-type: text/html; charset=iso-8859-1\r\n";
    
         
    
         /* additional headers */
    
         $headers .= "From: $fromid\r\n";
    
         $headers .= "Reply-To: $fromid\r\n";
    
    
    
         $msg="$GLOBALS[email_header]<br><br>$msg<br><br>$GLOBALS[email_footer]";
    
    
    
         //this will send mail to each person individually.
    
         $mailid=split(",",$mailid);
    
         for($i=0;$i<count($mailid);$i++)
    
         {
    
        //echo"Message : $msg";
    
            mail($mailid*, $sub, $msg,$headers);
    
         }
    
         return 1;
    
      }
    
    
    
      //function used for sending advertiser emails
    
      function advt_mail($email,$temp)
    
      {
    
         global $site_url,$advt_signup,$advt_signup_email_subject;
    
    
    
         $headers  ="MIME-Version: 1.0\r\n";
    
         $headers.="Content-type: text/html; charset=iso-8859-1\r\n";
    
    
    
         /* additional headers */
    
         $headers.="From: $GLOBALS[admin_mail_id]\r\n";
    
         $headers.="Reply-To: $GLOBALS[admin_mail_id]\r\n";
    
         $headers.="CC: $GLOBALS[admin_mail_id]\r\n";
    
    
    
         $advt_signup=file_reader("$site_html_path/advertiser_signup.html");
    
         $advt_signup=str_replace("[site_url]",$site_url,$advt_signup);
    
         $advt_signup=str_replace("[email]",$email,$advt_signup);
    
         $advt_signup=str_replace("[temp]",$temp,$advt_signup);
    
    
    
         $message.="$GLOBALS[email_header]<br><br>$advt_signup<br><br>$GLOBALS[email_footer]";
    
    
    
         if(mail($email,$advt_signup_email_subject,$message,$headers))
    
         {
    
            return true;
    
         }
    
      }
    
    
    
      //function to display links in member area 
    
      function menu($email,$ps)
    
      {
    
         global $site_html_path,$site_url;
    
    
    
         //to open the member_area.html page
    
         $members_links=file_reader("$site_html_path/members_links.html");
    
         $members_links=str_replace("[site_url]",$site_url,$members_links);
    
         $members_links=str_replace("[email]",$email,$members_links);
    
         $members_links=str_replace("[ps]",$ps,$members_links);
    
    
    
         return $members_links;
    
      }
    
    
    
      //function to display the error message
    
      function message($field,$msg)
    
      {
    
         print "<center><b>There is some error in processing. You did'nt enter\
    
         <font color=red>".$field."</font><br>".$msg."</b></center>";
    
      }
    
    
    
      //function to credit the earnings for referrals 
    
      function refbonus_credit($refid)
    
      {
    
         global $referral_bonus;
    
         //retrieving the previous value of referral bonus for the referrer in his earnings table
    
         $query4="SELECT referral_bonus FROM member_earnings where mem_id=$refid";
    
         if($result = mysql_query ($query4))
    
         {
    
        if($cr = mysql_fetch_array($result))
    
            {
    
           if($cr[0] == 0)
    
           $cr = $referral_bonus;
    
           else
    
           $cr = $cr[0]+$referral_bonus;
    
        }
    
            //updating a sum of 200 Cents ie $2 as referral bonus to the referrer
    
            $query5="update member_earnings set referral_bonus=$cr where mem_id=$refid";
    
            mysql_query($query5);
    
         }   
    
         return true;
    
      } 
    
    
    
      //function used to find number of members in each tiers.
    
      function sql($id,$i)
    
      {
    
         global $tier,$include_path;
    
    
    
         if(file_exists("$include_path/vars_commission.php")) { include ("$include_path/vars_commission.php");}
    
    
    
         $query="select count(*),mem_id from member_referrals where parent_id in ($id) group by mem_id";
    
         if($res = mysql_query ($query))
    
         {
    
            $tier*=mysql_num_rows($res);
    
            $res = mysql_fetch_array($res);
    
            $qry="select mem_id from member_referrals where parent_id in ($id)";
    
            if($result=mysql_query($qry)) {
    
               $i=1;
    
               while ($rs=mysql_fetch_array($result)){
    
                  $par_id*=$rs[0];
    
                  $i++;
    
               }
    
            }
    
            return $par_id;
    
         }
    
      }
    
    
    
      /*
    
        this function will move the referral tier one step ahead when a member
    
        is deleted or he unsubscribes himself from this site.
    
      */
    
      function move_Tier($mem_id)
    
      {
    
              
    
         //this will fetch the parent id for the member id passed as param.
    
         $par_id=member_referral($mem_id);
    
              
    
         //this query is to fetch the id's of members who were referred by this $mem_id
    
         $query="SELECT mem_id from member_referrals where parent_id=$mem_id ";
    
         $ch_id=Array();
    
         $i=0;
    
     if ($res=mysql_query($query))   
    
     {
    
            while($id=mysql_fetch_array($res))
    
            {
    
               $ch_id* = $id[0];
    
               $i++;
    
            }
    
            $query="UPDATE member_referrals set parent_id=$par_id where mem_id=";
    
            for($i=0;$i<count($ch_id);$i++)
    
            {
    
               mysql_query($query.$ch_id*);
    
            }
    
         }
    
         return 1;
    
      }
    
    
    
      //function to retrieve the parent id of an member
    
      function member_referral($id)
    
      {
    
         $query="select parent_id from member_referrals where mem_id=$id ";
    
         if($res = mysql_query ($query) )
    
         {
    
            if($res1 = mysql_fetch_array($res))
    
            {
    
               return $res1[0];
    
            }
    
         }
    
      }
    
    
    
      //function to credit the member earnings
    
      function credit_member($par_id,$comm_for)
    
      {
    
         global $include_path;
    
    
    
         if(file_exists("$include_path/vars_commission.php")) { include ("$include_path/vars_commission.php");}
    
    
    
         for($i=0;$i<count($par_id);$i++)
    
         {
    
            $query1="SELECT count(*) from member_earnings where mem_id='$par_id*' ";
    
            $res=mysql_query($query1) or die(mysql_error());
    
            $rows=mysql_num_rows($res);
    
            if($rows == 0) { $mode="INSERT";}
    
    
    
            if($comm_for == "click" || $comm_for == "all" )
    
            {
    
               $query1="SELECT pd_clickthro from member_earnings where mem_id='$par_id*' ";
    
               $res=mysql_query($query1);
    
               $data=mysql_fetch_array($res);
    
    
    
               if($mode == "INSERT")
    
               {
    
                  mysql_query("INSERT member_earnings set mem_id='$par_id*',pd_clickthro=$PerClickRate*") or die(mysql_error());
    
               }
    
               else
    
               {
    
                  $click_comm=($data[0]+$PerClickRate*);
    
                  mysql_query("UPDATE member_earnings set pd_clickthro=$click_comm where mem_id='$par_id*' ") or die(mysql_error());
    
               }
    
            }
    
    
    
           if($comm_for == "ref" || $comm_for == "all" )
    
           {
    
              $query1="SELECT referral_bonus from member_earnings where mem_id='$par_id*' ";
    
              $res=mysql_query($query1);
    
              $data=mysql_fetch_array($res);
    
    
    
              if($mode == "INSERT")
    
              {
    
                 mysql_query("INSERT member_earnings set mem_id='$par_id*',referral_bonus=$PerReferralRate*") or die(mysql_error());
    
              }
    
              else
    
              {
    
                 $ref_comm=($data[0]+$PerReferralRate*);
    
                 mysql_query("UPDATE member_earnings set referral_bonus=$ref_comm where mem_id='$par_id*' ") or die(mysql_error());
    
              }
    
           }
    
        }
    
     }
    
    
    
     //function used to credit the referrals
    
     function bonus_credit($referrer_id,$comm_for)
    
     {
    
        global $Total_Tiers;
    
    
    
        $j=0;
    
        $par_id[$j]=$referrer_id;
    
        for($i=0;$i<($Total_Tiers-1);$i++)
    
        {
    
           $referrer_id=member_referral($referrer_id);
    
           if(!$referrer_id || $referrer_id == "0")
    
              break;
    
    
    
           ++$j;
    
           $par_id[$j]=$referrer_id;
    
        }
    
        //this function will credit all the tier members
    
        credit_member($par_id,$comm_for);
    
     }
    

    //##########DO Not Edit Anything Below This##############

       //$admin_header=file_reader("$admin_html_path/header.html");
    
       //$admin_footer=file_reader("$admin_html_path/footer.html");
    
    
    
       $html_header = file_reader("$site_html_path/header.html");
    
       $html_footer = file_reader("$site_html_path/footer.html");
    
    
    
       $email_header = file_reader("$site_html_path/email/email_header.html");
    
       $email_footer = file_reader("$site_html_path/email/email_footer.html");
    
    
    
       $mem_signup = file_reader("$site_html_path/email/email_signup.html");
    
       $advt_signup = file_reader("$site_html_path/email/advertiser_signup.html");
    
    
    
       $out_messages = file_reader("$site_html_path/outfile.html");
    

    ?>


    vars.php
    <?
    $admin_mail_id="[email protected]"; //Site Admin's email adds. for contact

       //paths to folders
       $url="http://www.merc.netsons.org/paidmail";
       $path="/home/e-mailc/public_html/paidmail";
    
       $site_url="$url/site";   //virtual path of the site folder       
       $site_path="$path/site";   //physical path of the site folder  
       $siteadds="www.merc.netsons.org";   //site address
       $sitename="Merc";   //site name
    
       $dbhost = "mysql4.netsons.org";   //Host of the DataBase
       $dbname = "merc";   //DB Name
       $dbuser = "merc";   //DB user name
       $dbpwd = "11111111";    //DB user password
    
       $admin_url="$url/admin";   //virtual path of the admin folder
       $admin_path="$path/admin";  //physical path of the admin folder
       $include_path="$path/includes";  //physical path of the includes folder
    
       $admin_html_path="$admin_path/html";  //virtual path of the admin html folder
       $site_html_path="$site_path/html";   //virtual path of the site html folder
       $banner_url="$url/images";   //virtual path of the images folder
    
       $advt_regn_email_subject="Advertisement Purchased";  //Advertiser Registeration email message subject
       $email_regn_subject="Login Details for $sitename.com"; //Member Registeration email message subject
       $email_signup_subject="Signup Confirmation Email from $sitename.com"; //Sign up confirmation email subject
    
       $email_contactus_subject="$sitename.com Contact Us Message";
    
       $color_feedback_good = "green";   //normal feedback message
       $color_feedback_bad = "red";    //error feedback message
    

    ?>

    vars_arrays.php
    <?
    $age=Array(
    "18"=>"<18",
    "21"=>"18-21",
    "25"=>"22-25",
    "30"=>"26-30",
    "35"=>"31-35",
    "40"=>"36-40",
    "45"=>"41-45",
    "50"=>"46-50",
    "55"=>"51-55",
    "60"=>"56-60",
    "65"=>"61-65",
    "70"=>"66-70",
    "70+"=>"70+"
    );

    $marital=Array(
    "single"=>"Single",
    "married"=>"Married",
    "cohabiting"=>"Domestic Partnership",
    "divorced"=>"Divorced",
    "widowed"=>"Widowed",
    "separated"=>"Separated"
    );

    $household=Array(
    "1"=>"1",
    "2"=>"2",
    "3"=>"3",
    "4"=>"4",
    "5"=>"5",
    "6+"=>"6+"
    );

    $children=Array(
    "0"=>"0",
    "1"=>"1",
    "2"=>"2",
    "3"=>"3",
    "4"=>"4",
    "5+"=>"5+"
    );

    $income=Array(
    "10000"=>"Under $10,000",
    "20000"=>"$10,000 to $19,999",
    "30000"=>"$20,000 to $29,999",
    "40000"=>"$30,000 to $39,999",
    "50000"=>"$40,000 to $49,999",
    "75000"=>"$50,000 to $74,999",
    "100000"=>"$75,000 to $99,999",
    "150000"=>"$100,000 to $149,999",
    "150000+"=>"$150,000+"
    );

    $housestatus=Array(
    "owned"=>"Owned",
    "rented"=>"Rented"
    );

    $learning=Array(
    "school"=>"Some High School",
    "hsdiploma"=>"High School Diploma",
    "college"=>"Some College",
    "collegedegree"=>"College Degree",
    "graduatedegree"=>"Graduate Degree"
    );

    $occupation=Array(
    "academic"=>"Academic",
    "admin"=>"Administrative",
    "Banking"=>"Banking",
    "Consulting"=>"Consulting",
    "Engineering"=>"Engineering",
    "Investment"=>"Investment",
    "Managerial"=>"Managerial",
    "Military"=>"Military",
    "Professional"=>"Professional",
    "Student"=>"Student",
    "Sales"=>"Sales/Marketing",
    "Retired"=>"Retired",
    "Unemployed"=>"Between Jobs",
    "Other"=>"Other"
    );

    $vehicles=Array(
    "0"=>"0",
    "1"=>"1",
    "2"=>"2",
    "3+"=>"3+"
    );

    $spentonline=Array(
    "20"=>"Under $20",
    "50"=>"$20 to $49",
    "100"=>"$50 to $99",
    "100+"=>"$100+"
    );

    $interests=Array(
    "advertising"=>"Advertising",
    "affiliate"=>"Affiliate Programs",
    "arts"=>"Arts",
    "auto"=>"Automotive",
    "books"=>"Books",
    "business"=>"Business",
    "businessops"=>"Business Ops",
    "careers"=>"Careers",
    "computers"=>"Computers",
    "contests"=>"Contests & Lotteries",
    "creditcards"=>"Credit Cards",
    "dating"=>"Dating/Personals",
    "debt"=>"Debt Consolidation",
    "ecommerce"=>"E-Commerce",
    "education"=>"Education",
    "entertainment"=>"Entertainment",
    "fashion"=>"Fashion",
    "family"=>"Family",
    "food"=>"Food & Drink",
    "free"=>"Free Stuff",
    "gambling"=>"Gambling/Casinos",
    "gifts"=>"Gifts",
    "graphics"=>"Graphics",
    "health"=>"Health",
    "home"=>"Home & Garden",
    "homebusiness"=>"Home Business",
    "internet"=>"Internet",
    "legal"=>"Legal",
    "marketing"=>"Marketing",
    "media"=>"Media",
    "mlm"=>"MLM",
    "music"=>"Music",
    "news"=>"News",
    "finance"=>"Personal Finance",
    "pets"=>"Pets",
    "estate"=>"Real Estate",
    "reference"=>"Reference",
    "shopping"=>"Shopping",
    "smallbus"=>"Small Business",
    "sports"=>"Sports & Recreation",
    "sweepstakes"=>"Sweepstakes",
    "technology"=>"Technology",
    "travel"=>"Travel",
    "webmasters"=>"Webmasters",
    "webdesign"=>"Web Design"
    );

    ?>


  • User Attivo

    Non si capisce niente... usa il tag CODE

    
    

  • User

    pensa se non ci capisci niente te..in che condizione sono io......!

    questi sono i compiti a casa ,ho fatto quasi tutto tranne questo dilemma....

    Installation Instructions

    1. Change all instances of the word YourSiteName with your actual site name.

    2. Set up the MySQL database. The MySQL tables that you need to use are found in a file called sqltable.sql.

    3. Modify the following files:

    A. gold_vars.php - change the physical path of the gold membership folder to your actual path. Currently it is set as /home/netprofi/public_html/paidmail/gold_membership

    B. global.php - This file is found in the Includes folder. Change the path of the vars.php and vars_arrays.php files, which are found in the Includes folder. The 2 lines that you need to modify are:
    include("/home/netprofi/public_html/paidmail/includes/vars.php"); include("/home/netprofi/public_html/paidmail/includes/vars_arrays.php");

    C. vars.php - This is the file where you set your database name, database username and database password.

    1. Set the permssions to all the PHP files to 755. With the following exceptions:

    includes/vars_misc.php - this file should be set to 777
    includes/vars_commission.php - this file should be set to 777

    Also set the following files to 777:

    ** site/html/email/ - all files in this folder should be set to 777
    ** admin/backup.sql file
    ** site/html/header.html and site/html/footer.html
    ** admin/temp.txt
    ** gold_membership/random.txt

    help me......!!:x ***praticamente sono i le tre pagine php che devo modificare il passo a e b ma non riesco,mi da sempre errore...il nome del mio database e' merc,
    e il mio sito e' merc.netsons.org