Important : problème page web "under construction"
Posté : 02 avr. 2012, 16:07
Bonjour,
Je iens vers vous en espérant une réponse rapide compte tenu du caractère assez urgent de la demande.
Je n'arrive pas à solutionner un problème de programmation afin d'activer l'option d'envoi des adresses mails sur ma page web "under construction".
Voici le lien : http://www.gopys-store.com
J'ai correctement suivi la procédure m'invitant à activer cette possibilité sans succès via la documentation fournis dans le pack d'installation du site.
Je vous mets en copie le tutoriel d'installation et le fichier admin.php à programmer.
Un grand merci d'avance pour vos réponses.
Cordialement.
Tutoriel d'installation :
2.1 Enable the disabled features
Disabled features: mailing feature, currently working status update, and social media.
2.2 Enable mailing feature
What this mailing feature does is, when someone enter their email address in your site to receive emails about updates, this feature sends emails to you with the visitors email address.
Open the admin.php file
Couple of lines down the code you will see a variable called “$send_mail” you need to set this variable value equal to yes (inside quotation marks) This will enable the mailing feature.
$send_mail="no"; //set "yes" to activate email sending from website
Also right under that you will find a variable called “$youremail” set the email address you want the emails sent to, in here.
$youremail ="[email protected]"; // your email address
2.3 Customizing the email message you get
In the same file, admin.php scroll down to about line 180.
The variable “$message=” hold the message you will receive. And the variable $email contains the visitors email address. You can also use html code to write the message you want to receive, or use “\n” for new line break.
“$subject” variable holds the subject of the email variable.
Fichier admin.php à programmer :
<?php
/*
// -- Extended version of Under-construction program
// -- Designing and developed by ashanjay (ashanjay.com)
//
*/
// ---- !!! IMPORTANT !!! ------
// Change these variables values to fit your personal data for program to work seemlessly for your site
$backEND_pswd='admin'; // Password to the backend panel!
Je iens vers vous en espérant une réponse rapide compte tenu du caractère assez urgent de la demande.
Je n'arrive pas à solutionner un problème de programmation afin d'activer l'option d'envoi des adresses mails sur ma page web "under construction".
Voici le lien : http://www.gopys-store.com
J'ai correctement suivi la procédure m'invitant à activer cette possibilité sans succès via la documentation fournis dans le pack d'installation du site.
Je vous mets en copie le tutoriel d'installation et le fichier admin.php à programmer.
Un grand merci d'avance pour vos réponses.
Cordialement.
Tutoriel d'installation :
2.1 Enable the disabled features
Disabled features: mailing feature, currently working status update, and social media.
2.2 Enable mailing feature
What this mailing feature does is, when someone enter their email address in your site to receive emails about updates, this feature sends emails to you with the visitors email address.
Open the admin.php file
Couple of lines down the code you will see a variable called “$send_mail” you need to set this variable value equal to yes (inside quotation marks) This will enable the mailing feature.
$send_mail="no"; //set "yes" to activate email sending from website
Also right under that you will find a variable called “$youremail” set the email address you want the emails sent to, in here.
$youremail ="[email protected]"; // your email address
2.3 Customizing the email message you get
In the same file, admin.php scroll down to about line 180.
The variable “$message=” hold the message you will receive. And the variable $email contains the visitors email address. You can also use html code to write the message you want to receive, or use “\n” for new line break.
“$subject” variable holds the subject of the email variable.
Fichier admin.php à programmer :
<?php
/*
// -- Extended version of Under-construction program
// -- Designing and developed by ashanjay (ashanjay.com)
//
*/
// ---- !!! IMPORTANT !!! ------
// Change these variables values to fit your personal data for program to work seemlessly for your site
$backEND_pswd='admin'; // Password to the backend panel!
//back-end timer year select options
$yearFD=3; //how many years forward - I recommend 3 or less.. or else days number would be huge
//Sending the email from website
$send_mail="yes"; //set "yes" to activate email sending from website
$youremail ="[email protected]"; // your email address
//
//Retrieve information from the text file
$filename='un-data.txt';
$fp=fopen($filename,'r');
$theData=fread($fp, filesize($filename));
$myData=explode("|$|",$theData);
if($myData[0]==""){$year=2011;}else{$year=$myData[0];}
if($myData[1]==""){$month=12;}else{$month=$myData[1];}
if($myData[2]==""){$date=12;}else{$date=$myData[2];}
if($myData[3]==""){$perct=30;}else{$perct=$myData[3];}
$curWork=$myData[4];
$faceB=$myData[5];
$twit=$myData[6];
fclose($fp);
//write new variables to text file, return yes or no for result
function fwrite_stream($str, $str2){
$fpp=fopen($str,'w');
$fwrite=fwrite($fpp,$str2);
fclose($fpp);
if($fwrite==false){ $res= "no";
}else{ $res="yes";}
return $res;
}
//Time data
$Cyear=date('Y');//current year
$months=array(1=>'JANUARY','FEBRUARY','MARCH','APRIL','MAY',
'JUNE','JULY','AUGUST','SEPTEMBER','OCTOBER','NOVEMBER','DECEMBER');
//////////////***********************************************************////////////
switch ($_REQUEST['taskDO']){
case('checker'):
$email=$_GET['email'];
if($email==$backEND_pswd){//check if the value entered is the password to backend
$per2=($perct/10)*(-46);
echo"admin|$|
<div class='ad_head'>
<p class='ad_h1'>Furnine Under Constrction Page: Administrator</p>
<a id='ad_close'>Close</a>
</div>
<div class='completed'>
<div class='com_left'>
<p class='ad_h3'>percentage</p>
<p class='ad_h2'>COMPLETED</p>
</div>
<div id='com_num'>
<a id='cm_up' class='arrows'></a>
<div class='cm_no_holder'>
<ul id='cm_no' style='margin-top:".$per2."px;'>";
for($u=0;$u<11;$u++){
$ur=$u*10;
echo "<li >$ur<span>%</span></li>";
}
echo"</ul>
</div>
<a id='cm_down' class='arrows'></a>
</div>
<a id='ad_save' style='display:none;'onclick='savePECT()'>SAVE</a>
</div>
<div class='working'>
<div class='lfc_tag'><p class='ad_h4'> Currently Working </p></div>
";
if($curWork==""){
echo"<p class='ad_h4 boton' name='currWork' style='display:none;'>".$curWork."</p>
<div id='currW_holder' >
<input id='currW' class='inb' name='currW' />
<a id='currWS' onclick='sCwork()' >Save</a><a class='sfbtn'>Cancel</a></div>";
}else{
echo"<p class='ad_h4 boton' name='currWork'>".$curWork."</p>
<div id='currW_holder' style='display:none;'>
<input id='currW' name='currW' class='inb'value='$curWork' />
<a id='currWS' onclick='sCwork()' >Save</a><a class='sfbtn'>Cancel</a></div>
";}
echo"
</div>
<div class='expire'>
<div class='lf_tag'><p class='ad_h4' style='padding-right:5px;'>Expiration Date: </p></div>
<p class='ad_h4 boton' id='expireD'>$date $months[$month] $year
</p>
<div id='expDS_holder' class='edtBar' style='display:none;' >
<select name='month'>";
for($u2=1;$u2<=sizeof($months);$u2++){
echo"<option value='$u2'"; if($u2==$month){echo" selected";}
echo ">$months[$u2]</option>";
}
echo"</select>
<select name='date'>";
for($u3=1;$u3<32;$u3++){
echo"<option value='$u3'"; if($u3==$date){echo" selected";}
echo">$u3</option>";
}
echo"</select>
<select name='year'>";
for($u4=0;$u4<$yearFD;$u4++){
$yearN=$Cyear+$u4;
echo"<option value='$yearN'"; if($yearN==$year){echo" selected";}
echo">$yearN</option>";
}
echo"</select>
<a id='expDS' class='sfbtn' onclick='expDS()' >Save</a><a class='sfbtn' name='cancel' >Cancel</a></div>
</div>
<div class='socialM'>
<div class='lf_tag'><p class='ad_h4'>Social Media</p></div>
<p class='ad_h4 boton' name='facebook' >Facebook</p>
<p class='ad_h4 boton' name='twitter' style='padding-left:10px;'>Twitter</p>
</div>
<div id='fb_row'class='row' style='display:none;'>
<p class='ad_h4 label'>Link</p>";
if($faceB==""){
echo"
<p id='fbLK_p' class='ad_h4 boton' >Click here to add link!</p>
<div class='edtBar' style='display:none'><input type='text' name='fblink' class='inb2'/>
<a id='fbLK' class='sfbtn' onclick='fbLK()'>Save</a>
<a class='sfbtn' name='cancel' >Cancel</a>
</div>";
}else{
echo "<p id='fbLK_p' class='ad_h4 boton'>$faceB</p>
<div class='edtBar' style='display:none;'>
<input type='text' name='fblink' class='inb2' value='$faceB'/>
<a id='fbLK' class='sfbtn' onclick='fbLK()'>Save</a>
<a class='sfbtn' name='cancel' >Cancel</a>
</div>";
}
//twitter information section
echo"</div>
<div id='tw_row'class='row' style='display:none;'>
<p class='ad_h4 label'>Username</p>";
if($twit==""){
echo"
<p id='twLK_p' class='ad_h4 boton' >Click here to add only the twitter username!</p>
<div class='edtBar' style='display:none'><input type='text' name='twlink' class='inb2'/>
<a id='twLK' class='sfbtn' onclick='twLK()'>Save</a>
<a class='sfbtn' name='cancel' >Cancel</a>
</div>";
}else{
echo "<p id='twLK_p' class='ad_h4 boton'>$twit</p>
<div class='edtBar' style='display:none;'>
<input type='text' name='twlink' class='inb2' value='$twit'/>
<a id='twLK' class='sfbtn' onclick='twLK()'>Save</a>
<a class='sfbtn' name='cancel' >Cancel</a>
</div>";
}
echo"</div>
<div class='blank'><p class='ad_h5'></p></div>";
}else{//if someone enters an email addres, which will be mailed to you
//If you did not enter the PASS CODE
//check for valid email address
if(!ereg("^.+@.+\..+$",$email)){
echo "noEM|$|";
}else{//Valid email and not admin pass code
$message="I need updates from your website!"."\r".
"Send updates to this email address: $email";
$subject="Need website updates";
$headers = 'From: [email protected]' .
"\r\n".'Reply-to: [email protected]'."\r\n".'X-Mailer: PHP/'. phpversion();
if($send_mail="yes"){mail($youremail, $subject, $message, $headers);}
echo "EM|$|";
}
}
break;
//Save twitter link
case('twLK'):
$Xtwit=$_GET['twit'];
$data5=$year."|$|".$month."|$|".$date."|$|".$perct."|$|".$curWork."|$|".$faceB."|$|".$Xtwit;
echo fwrite_stream($filename, $data5);
break;
//Save facebook link
case('fbLK'):
$XfaceB=$_GET['faceB'];
$data4=$year."|$|".$month."|$|".$date."|$|".$perct."|$|".$curWork."|$|".$XfaceB."|$|".$twit;
echo fwrite_stream($filename, $data4);
break;
//Save expiration date
case('expDS'):
$Xmonth=$_GET['month'];
$Xdate=$_GET['date'];
$Xyear=$_GET['year'];
$data3=$Xyear."|$|".$Xmonth."|$|".$Xdate."|$|".$perct."|$|".$curWork."|$|".$faceB."|$|".$twit;
echo fwrite_stream($filename, $data3);
echo "|$|".$months[$Xmonth];
break;
//save currently working
case('sCwork'):
$XcurWork=$_GET['currW'];
$data2=$year."|$|".$month."|$|".$date."|$|".$perct."|$|".$XcurWork."|$|".$faceB."|$|".$twit;
echo fwrite_stream($filename, $data2);
break;
//save percentage time
case('sPect'):
$Xperct=$_GET['perct'];
$data=$year."|$|".$month."|$|".$date."|$|".$Xperct."|$|".$curWork."|$|".$faceB."|$|".$twit;
echo fwrite_stream($filename, $data);
break;
}
?>