Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP Help Needed! Please :)
Old 08-20-2004, 11:42 AM PHP Help Needed! Please :)
Webmaster Talker

Posts: 560
Trades: 0
Hey guys, I need some help with .php. I am running a reciprocal links program, well at least trying to, and you are supposed set up a base page for it, and then with the click of a button, it makes all the indivual pages for you (i.e. the Category pages). I have to run a file called "makefile.php", edit it to how i'd like it and then run it, then hit that magical button to make all the pages. Ok so, I want the hyperlinks on all the pages with no text decoration, no underline, but I am having trouble editing "makefile.php" in the right place. Here it is, take a look and if you could help me out by telling me exactly where and how to add the no text decoration code, thatd be great. Here it is:



<?php
// Unauthorized modification or using parts of the codes in Swapware to make your own software is strictly prohibited.


// ATTENTION: Your session will be logged. Any attempt to copy,
// delete or view data not belonging to you, will result in a termination
// to your Swapware account!
//
// Copyright by bookfinder.us. You modify the file: makefile.php to customize it for
// you site. The final version of your modification must be emailed to swapware@bookfinder.us
// and becomes the property of bookfinder.us.
//
// You may modify the files makefile.php, submit_website_header.php, header_template.htm and footer_template.htm
// to customize the Swapware for your website.

require 'db_connect.php';
include('check_login.php');

if (@fclose(@fopen("delowner.txt", "r"))) {
$filename = "delowner.txt";
$handle = fopen ($filename, "r");
$HTTP_GET_VARS['admin_email'] = trim(fread ($handle, filesize ($filename)));
}

if (isset($_SESSION['username'])) {
$HTTP_GET_VARS['admin_email'] = $_SESSION['username'];
$HTTP_GET_VARS['admin_website'] = $_SESSION['admin_website'];

}
if(!isset($HTTP_GET_VARS['admin_email'])) die('You maynot access this file directly. Please login.');


// require our database connection
// which also contains the check_login.php
// script. We have $logged_in for use.

/*
if ($_SESSION['logged_in'] == 0) {
die('Sorry you are not logged in, this area is restricted to registered members. <a href="login.php">Click here</a> to log in.');
} */


if (@fclose(@fopen("delowner.txt", "r"))) {
$filename = "delowner.txt";
$handle = fopen ($filename, "r");
$owner = trim(fread ($handle, filesize ($filename)));
if($owner != $HTTP_GET_VARS['admin_email']) die('Sorry this copy of Swapware is not registed to you. Only user
href="delowner.txt">listed here</a> is allow to use this copy of Swapware. Please logon to our own copy from your own site.');
fclose ($handle);

} else {
print("<br>Swapware makefile permission set. You may now log back in (<a href=\"login.php\">login.php</a>) to access the administration tools.<br>");
}




// ******************** SUBMIT SUCCESS ************************
$filename = "header_template.htm";
$handle = fopen ($filename, "r");
$header_display = fread ($handle, filesize ($filename));
fclose ($handle);
echo $header_display;

$cursor = mysql_query("select * from cat_admin where admin_email = '".$HTTP_GET_VARS['admin_email']."'");
if (!$cursor)
{
echo("<H3>MySQL error: " . mysql_error() . "</H3>");
exit();
}

while ( $row = mysql_fetch_array($cursor) )
{
$admin_website = $row["admin_website"];
$email_notification = $row["email_notification"];
$automatic_manually_approve = $row["automatic_manually_approve"];
$atitle = $row["admin_title"];
$adesp = $row["admin_description"];
$categories = str_replace(array('\''),'\'\'',$row["categories"]);

$description = $row["admin_description"];
}
function cuttext($tring,$cuton) {

/* Define the character to cut on */
/* One could make an array with all characters to cut on */
/* But I wouldn't know how to */

$space=",";
$teller=0;
if (!strstr($tring,$space)) {

/* No space is found in the whole string: cut at 20th character */

$tring=substr($tring,0,$cuton);
}
if (substr($tring,$cuton,1)==$space) {

/* 21st character is a space: cut at 20th character */

$tring=substr($tring,0,$cuton);
} else {

/* 21st Character is NOT a space: return to last space and cut there */

while ($teller <= $cuton) {
if (substr($tring,$cuton-$teller,1)==$space) {
$tring=substr($tring,0,$cuton-$teller);
break;
}
$teller++;
}

}
return $tring;
}

function count_cat($string,$admin_email){


$cursor = mysql_query("select linkstatus,status from cat_main_table where admin_email='".$admin_email."' AND category='".$string."'");
if (!$cursor)
{
echo("<H3>MySQL error: " . mysql_error() . "</H3>");
exit();
}

$counter = 0;
while ( $row = mysql_fetch_array($cursor) ){

if($row["status"] == "pending")continue;
if($row["status"] == "approved" && $row["linkstatus"] == "down")continue;
$counter++;
}
return $counter;
}

function select_link($string,$admin_email,$admin_website){
$cursor = mysql_query("select * from cat_main_table where admin_email='".$admin_email."' AND category='".$string."'");

$str = "";
if (!$cursor)
{
$str = $str."<H3>MySQL error: " . mysql_error() . "</H3>";
exit();
}

$counter = 0;
$str = $str."<table border=\"0\" width=\"90%\" cellspacing=\"0\" cellpadding=\"0\">\n<tr><td>\n";
$str = $str."<br><font face=\"Verdana\" size=\"2\"><b>". str_replace(array('\'\''),'\'',$string)."</b></font><br><br>\n";
$str = $str."</td></tr>\n \n";


/***** style 1
while ( $row = mysql_fetch_array($cursor) ){
$str = $str."<p>\n";
$str = $str." <font face=\"Verdana\" size=\"2\"><a href=\"". $row["url"]."\" target=\"_bkusa\"><b>". $row["sitename"]."</b></a><br> \n";
$str = $str.$row["description"]."</font>\n";
$str = $str."</p>\n";
}
*****/

//**** style 2
$i = 0;
while ( $row = mysql_fetch_array($cursor) ){

if($row["status"] == "pending")continue;
if($row["status"] == "approved" && $row["linkstatus"] == "down")continue;

if($i%2 ==0){
$str = $str."<tr bgcolor=\"#EFEFEF\">\n";
$str = $str." <td><b><font face=\"Verdana\" size=\"2\"><a href=\"". $row["url"]."\" target=\"_bkusa\">". $row["sitename"]."</a></font></b>\n";
if(strlen(trim($row["description"],"- ")) >= 2) $str = $str." - <font face=\"Verdana\" size=\"2\">". trim($row["description"],"- ")."</font>\n";
$str = $str."</td></tr>\n";
}else{
$str = $str."<tr bgcolor=\"#FFFFFF\">\n";
$str = $str." <td><b><font face=\"Verdana\" size=\"2\"><a href=\"". $row["url"]."\" target=\"_bkusa\">". $row["sitename"]."</a></font></b>\n";
if(strlen(trim($row["description"],"- ")) >= 2) $str = $str." - <font face=\"Verdana\" size=\"2\">". trim($row["description"],"- ")."</font>\n";
$str = $str."</td></tr>\n";
}
$i++;
}
//****

// $str = $str."\n</table><br><br>";
// $str = $str."<table border=\"0\" width=\"95%\" cellspacing=\"0\" cellpadding=\"0\">\n";

$str = $str."<TR align=\"center\">\n <TD><br><br><A HREF=\"index.html\"><b>Go Back</b></a>&nbsp; | &nbsp;<A HREF=\"submit_website.html\"><b>Submit Website</b></a>\n </TD>\n</TR>\n</table>\n";


// $str = $str."</table>\n";

return $str;
}

function cuttext_tail($tring,$cuton) {

/* Define the character to cut on */
/* One could make an array witll characters to cut on */
/* But I wouldn't know how to */

$space=",";
$teller=0;
if (!strstr($tring,$space)) {

/* No space is found in the whole string: cut at 20th character */

$tring=substr($tring,$cuton+1);
}
if (substr($tring,$cuton,1)==$space) {

/* 21st character is a space: cut at 20th character */

$tring=substr($tring,$cuton+1);
} else {

/* 21st Character is NOT a space: return to last space and cut there */

while ($teller <= $cuton) {
if (substr($tring,$cuton-$teller,1)==$space) {
$tring=substr($tring,$cuton-$teller+1);
break;
}
$teller++;
}


}
return $tring;
}
$CatArray = array (0 => " ");
$i = 1;
while (null != ($cat_tail = cuttext_tail($categories,15000))) {
$CatArray[$i] = trim($cat_tail);
$categories=cuttext($categories,15000);
$i++;
}
$CatArray[$i]= trim($categories);

sort($CatArray);
reset($CatArray);



//print_r($CatArray);
//echo("$i");


//**********************************creating category page************************//
$str = "";

$count = $i;
$k = 0;
if($count%2 == 0){
$k = (int)($count/2);
}else{
$k = (int)($count/2) + 1;
}

if($k != 0){
$str = $str."<html><head><title>".$description."</title></head>\n";

echo "<br>Reading from file header_template.htm for HTML file header.<br>";

$filename = "header_template.htm";
$handle = fopen ($filename, "r");
$header = fread ($handle, filesize ($filename));
fclose ($handle);

$filename = "header_template.htm";
$handle = fopen ($filename, "r");
$headermain = fread ($handle, filesize ($filename));
fclose ($handle);

echo "Reading from file footer_template.htm for HTML file footer.<br>";

$filename = "footer_template.htm";
$handle = fopen ($filename, "r");
$tailer = fread ($handle, filesize ($filename));
fclose ($handle);

$filename = "footer_template.htm";
$handle = fopen ($filename, "r");
$tailermain = fread ($handle, filesize ($filename));
fclose ($handle);

$str = $str.$headermain."<center>";
$str = $str."\n<table border=\"0\" width=\"90%\" cellspacing=\"0\" cellpadding=\"0\"><tr><td>&nbsp;<br></td></tr>\n";
$str = $str."<tr>\n";

$i = 1;
while($i <= $count){
if(($i - 1)%$k == 0){
$str = $str." <td width=\"50%\" valign=\"top\" bordercolor=\"FFFFFF\"><ul><font face=\"Verdana\" size=\"-1\" color=\"336699\">\n";
}
$Catstr = $CatArray[$i];
// $CatArray[$i] = str_replace(array('\'\''),'\'',$CatArray[$i]);
echo "<br>Making file: ".str_replace(array(' ','\'','&','/'),'_',$CatArray[$i]).".html";
$str = $str." <li><A href =\"". str_replace(array(' ','\'','&','/'),'_',$CatArray[$i]).".html\"><b>". str_replace(array('\'\''),'\'',$CatArray[$i])." (".count_cat($Catstr,$HTTP_GET_VARS['admin_email']).")</b></A></li>\n";
$fs = fopen(str_replace(array(' ','\'','&','/'),'_',$CatArray[$i]).".html", "w+" ) or die('<h2><br>Error when opening the file for write. To resolve this issue, please issue chmod 777 to your Swapware directory. If you are using cuteftp, or wsftp, you can right click on the Swapware folder and click on \"CHMOD\", then issue chmod 777 command by checking all read,write, and execute checkboxes.</h2>');
$outfile = ("<html><head><title>". str_replace(array('\'\''),'\'',$CatArray[$i])."</title></head>\n".$header."<center>".select_link($CatArray[$i],$HTTP_GET_VARS['admin_email'],$admin_website));
$outfile = $outfile."<br><br><br><br>\n";




$outfile = $outfile."</center>".$tailer."\n";
fwrite($fs, $outfile);
fclose($fs);

$i++;

if(($i - 1)%$k == 0){
$str = $str." </font>\n </ul></td>\n";
}
}//end while

if(($i - 1)%$k != 0){
$str = $str." </font>\n </td>\n";
}
$str = $str."</tr>\n";
$str = $str."<TR align=\"center\">\n <TD colspan=3><br><br><A HREF=\"submit_website.html\"><b>Submit Website</b></a>\n </TD>\n</TR>\n</table>\n";

}//end if(k != 0)





$str = $str."</center>".$tailermain;
echo "<br>Making file: index.html <br>";
$fs = fopen("index.html", "w+" ) or die('error when opening the file');
fwrite($fs, $str);
fclose($fs);


// ************************************************** ********************
echo "\nMaking file submit_website.html...";
$submit_website = $submit_website."<html>\n";
$submit_website = $submit_website."<head><title>Submit your website to ".$atitle."</title>\n";
$submit_website = $submit_website."<SCRIPT LANGUAGE=\"JavaScript\">\n";
$submit_website = $submit_website."var submitcount = 0;\n";
$submit_website = $submit_website."function formCheck() {\n";
$submit_website = $submit_website."if (!ValidLength(document.info.username.value,3)){\n" ;
$submit_website = $submit_website." alert(\"Please enter your name!\");\n";
$submit_website = $submit_website." return false;\n";
$submit_website = $submit_website." }\n";
$submit_website = $submit_website."if (!ValidEmail(document.info.email.value)){\n";
$submit_website = $submit_website." alert(\"Please enter a valid email address!\");\n";
$submit_website = $submit_website." return false;\n";
$submit_website = $submit_website." }\n";
$submit_website = $submit_website."if (!ValidLength(document.info.sitename.value,2)){\n" ;
$submit_website = $submit_website." alert(\"Please enter your site name!\");\n";
$submit_website = $submit_website." return false;\n";
$submit_website = $submit_website." }\n";
$submit_website = $submit_website."if (!ValidLength(document.info.url.value,5)){\n";
$submit_website = $submit_website." alert(\"Please enter your URL!\");\n";
$submit_website = $submit_website." return false;\n";
$submit_website = $submit_website." }\n";
$submit_website = $submit_website."if(document.info.url.value.indexO f(\"http://\") < 0){\n";
$submit_website = $submit_website." alert(\"Please enter a valid url like the given example!\");\n";
$submit_website = $submit_website." return false;\n";
$submit_website = $submit_website." } \n";
$submit_website = $submit_website."if (!ValidLength(document.info.despt.value,2)){\n";
$submit_website = $submit_website." alert(\"Please enter a short description of your site!\");\n";
$submit_website = $submit_website." return false;\n";
$submit_website = $submit_website." }\n";
$submit_website = $submit_website."if (!ValidLength(document.info.cat.options[document.info.cat.selectedIndex].value,2)){\n";
$submit_website = $submit_website." alert(\"Please select a category for your site.\");\n";
$submit_website = $submit_website." return false;\n";
$submit_website = $submit_website." }\n";
$submit_website = $submit_website."if (!ValidLength(document.info.link.value,1)){\n";
$submit_website = $submit_website." alert(\"Please enter a reciprocal link!\");\n";
$submit_website = $submit_website." return false;\n";
$submit_website = $submit_website." }\n";
$submit_website = $submit_website."if(document.info.link.value.index Of(\"http://\") < 0){\n";
$submit_website = $submit_website." alert(\"Please enter a valid reciprocal link like the given example!\");\n";
$submit_website = $submit_website." return false;\n";
$submit_website = $submit_website." } \n";
$submit_website = $submit_website."if (submitcount == 0)\n";
$submit_website = $submit_website." {\n";
$submit_website = $submit_website." document.info.phone.value=document.info.area.value + \"-\" + document.info.pre.value + \"-\" + document.info.phone1.value + \" \" + document.info.extn.value;\n";
$submit_website = $submit_website." document.info.area.value=\"\";\n";
$submit_website = $submit_website." document.info.pre.value=\"\";\n";
$submit_website = $submit_website." document.info.phone1.value=\"\";\n";
$submit_website = $submit_website." document.info.extn.value=\"\";\n";
$submit_website = $submit_website." submitcount++;\n";
$submit_website = $submit_website." return true;\n";
$submit_website = $submit_website."}\n";
$submit_website = $submit_website."} \n";
$submit_website = $submit_website."//function to validate by length\n";
$submit_website = $submit_website."function ValidLength(item, len) {\n";
$submit_website = $submit_website." return (item.length >= len);\n";
$submit_website = $submit_website."}\n";
$submit_website = $submit_website."//function to validate an email address\n";
$submit_website = $submit_website."function ValidEmail(item) {\n";
$submit_website = $submit_website." emailcheck=item;\n";
$submit_website = $submit_website." //check for disallowed characters\n";
$submit_website = $submit_website." invalids=\" /:;,\";\n";
$submit_website = $submit_website." for(i=0; i<invalids.length; i++){\n";
$submit_website = $submit_website." characto=(invalids.charAt(i));\n";
$submit_website = $submit_website." if (emailcheck.indexOf(characto) != -1){\n";
$submit_website = $submit_website." return false; }\n";
$submit_website = $submit_website." }\n";
$submit_website = $submit_website." //check for @, skip first character\n";
$submit_website = $submit_website." atindex= emailcheck.indexOf(\"@\",1)\n";
$submit_website = $submit_website." if (atindex == -1){\n";
$submit_website = $submit_website." return false; }\n";
$submit_website = $submit_website." //check for only one @\n";
$submit_website = $submit_website." if (emailcheck.indexOf(\"@\",atindex+1) != -1){\n";
$submit_website = $submit_website." return false;; }\n";
$submit_website = $submit_website." //check for dot after @\n";
$submit_website = $submit_website." dotindex=emailcheck.indexOf(\".\",atindex+1)\n";
$submit_website = $submit_website." if (dotindex == -1){\n";
$submit_website = $submit_website." return false; }\n";
$submit_website = $submit_website." //check for at least 2 chars after dot\n";
$submit_website = $submit_website." if ((dotindex+3) > emailcheck.length) {\n";
$submit_website = $submit_website." return false;;}\n";
$submit_website = $submit_website." return true;\n";
$submit_website = $submit_website."}\n";

$submit_website = $submit_website."function tabPhone1() {\n";
$submit_website = $submit_website." var phval=\"\";\n";
$submit_website = $submit_website." phval=document.info.area.value;\n";
$submit_website = $submit_website." if(phval.length==3) {\n";
$submit_website = $submit_website." document.info.pre.focus();\n";
$submit_website = $submit_website." phval.length=0; }\n";
$submit_website = $submit_website."}\n";

$submit_website = $submit_website."function tabPhone2() {\n";
$submit_website = $submit_website." var phval=\"\";\n";
$submit_website = $submit_website." phval=document.info.pre.value;\n";
$submit_website = $submit_website." if(phval.length==3) {\n";
$submit_website = $submit_website." document.info.phone1.focus();\n";
$submit_website = $submit_website." phval.length=0; }\n";
$submit_website = $submit_website."}\n";

$submit_website = $submit_website."</SCRIPT>\n";
$submit_website = $submit_website."</head>\n";
$submit_website = $submit_website."<body>\n";

$filename = "header_template.htm";
$handle = fopen ($filename, "r");
$submit_website_header = fread ($handle, filesize ($filename));
fclose ($handle);
$submit_website = $submit_website.$submit_website_header;

$submit_website = $submit_website."<table width=\"80%\"><tr><td>\n";
$submit_website = $submit_website."<font size=\"3\" face=\"Verdana
\"><b>\n";
$submit_website = $submit_website."Submit your website to ".$atitle."\n";
$submit_website = $submit_website."</b><br><br>\n";
$submit_website = $submit_website."<font size=\"2\">Thank you for your interest in being included in our links page. \n";
$submit_website = $submit_website."Follow the instructions below to fill in the form. It is very important that you put <b>a reciprocal link on your page before you click submit</b>. \n";
$submit_website = $submit_website." <ul>\n";
$submit_website = $submit_website." <li> You may use the following code to create a reciprocal link to us: <br></li> \n";
$submit_website = $submit_website." <textarea name=\"msg\" rows=5 wrap=PHYSICAL maxlength=5000 cols=75 text=\"one, tow\"><a href=\"".$admin_website."\">".$atitle."</a> - ".$adesp."\n";
$submit_website = $submit_website." </textarea>\n";
$submit_website = $submit_website." <li> \n";
$submit_website = $submit_website." Within 48 hours a human editor will review your site. You may need to click refresh on your browser to see the change.<br><br> \n";
$submit_website = $submit_website." </li><br>\n";

$submit_website = $submit_website." </ul></font></font>\n";
$submit_website = $submit_website."</td></tr></table>\n";
$submit_website = $submit_website."<hr width=\"80%\" align=\"left\" color=\"CE6500\">\n";
$submit_website = $submit_website."All the following information is required except\"Additional Comments\" for smooth <br>processing of your application. <br>\n";
$submit_website = $submit_website."<form name=\"info\" onsubmit=\"return formCheck()\" method=\"post\" action = \"http://www.bookfinder.us/booksearch/submit2\">\n";
$submit_website = $submit_website."<input type=\"hidden\" name=\"form_type\" value=\"info\">\n";

$submit_website = $submit_website."<input type=\"hidden\" name=\"automatic_manually_approve\" value=\"".$automatic_manually_approve."\">\n";
$submit_website = $submit_website."<input type=\"hidden\" name=\"email_notification\" value=\"".$email_notification."\">\n";
$submit_website = $submit_website."<input type=\"hidden\" name=\"admin_email\" value=\"".$HTTP_GET_VARS["admin_email"]."\"> \n";
$submit_website = $submit_website."<input type=\"hidden\" name=\"admin_website\" value=\"".$admin_website."\"> \n";
$submit_website = $submit_website."<input type=\"hidden\" name=\"phone\">\n";
$submit_website = $submit_website."<table width=\"80%\">\n";
$submit_website = $submit_website." <tr>\n";
$submit_website = $submit_website." <td width=\"25%\"><font size=\"2\" face=\"Verdana\"><b>Your Name:</b></font></td>\n";
$submit_website = $submit_website." <td width=\"75%\"><font size=\"2\" face=\"Verdana\"><input maxLength=\"50\" size=\"30\" name=\"username\"><i>(No less then 3 chars)</i></font></td>\n";
$submit_website = $submit_website." </tr>\n";
$submit_website = $submit_website." <tr>\n";
$submit_website = $submit_website." <td width=\"25%\"><font size=\"2\" face=\"Verdana\"><b>Your Email Address:</b></font></td>\n";
$submit_website = $submit_website." <td width=\"75%\"><font size=\"2\" face=\"Verdana\"><input maxLength=\"100\" size=\"30\" name=\"email\"><i>(A valid email address is required, annie@hotmail.com e.g.)</i></font></td>\n";
$submit_website = $submit_website." </tr>\n";
$submit_website = $submit_website." <tr><td colspan=\"2\">&nbsp;</td></tr>\n";
$submit_website = $submit_website." <tr>\n";
$submit_website = $submit_website." <td width=\"25%\"><font size=\"2\" face=\"Verdana\"><b>Site Name:</b></font></td>\n";
$submit_website = $submit_website." <td width=\"75%\"><font size=\"2\" face=\"Verdana\"><input maxLength=\"255\" size=\"65\" name=\"sitename\"><br><i>(Bookfinder.US e.g.)</i></font></td>\n";
$submit_website = $submit_website." </tr>\n";
$submit_website = $submit_website." <tr><td colspan=\"2\">&nbsp;</td></tr>\n";
$submit_website = $submit_website." <tr>\n";
$submit_website = $submit_website." <td width=\"25%\"><font size=\"2\" face=\"Verdana\"><b>URL:</b></font></td>\n";
$submit_website = $submit_website." <td width=\"75%\"><font size=\"2\" face=\"Verdana\"><input maxLength=\"255\" size=\"65\" name=\"url\" value=\"http://\"><br><i>(http://www.bookfinder.us e.g.)</i></font></td>\n";
$submit_website = $submit_website." </tr>\n";
$submit_website = $submit_website." <tr><td colspan=\"2\">&nbsp;</td></tr>\n";
$submit_website = $submit_website." <tr>\n";
$submit_website = $submit_website." <td width=\"25%\"><font size=\"2\" face=\"Verdana\"><b>Category</b></font></td>\n";
$submit_website = $submit_website." <td width=\"75%\"><select size=\"1\" name=\"cat\">\n";
$submit_website = $submit_website." <option value>Pick a Category</option>\n";
$j=1;
while($j <= $i) {

if (isset($HTTP_GET_VARS['category'])) {
if (preg_match("/".$HTTP_GET_VARS['category']."/i",$CatArray[$j],$var)) {
$submit_website = $submit_website."<option value=\"".$CatArray[$j]."\" selected>".$CatArray[$j]."</option>\n";
} else {
$submit_website = $submit_website."<option value=\"".$CatArray[$j]."\">".$CatArray[$j]."</option>\n";
}
} else {
$submit_website = $submit_website."<option value=\"".$CatArray[$j]."\">".$CatArray[$j]."</option>\n";
}
$j++;
}
$submit_website = $submit_website."</select>\n";
$submit_website = $submit_website." </td>\n";
$submit_website = $submit_website." </tr>\n";
$submit_website = $submit_website." <tr>\n";
$submit_website = $submit_website." <td width=\"25%\"><font size=\"2\" face=\"Verdana\"><b>Site Description:</b></font></td>\n";
$submit_website = $submit_website." <td width=\"85%\"><font size=\"2\" face=\"Verdana\"><input maxLength=\"255\" size=\"65\" name=\"despt\"><br></font></td>\n";
$submit_website = $submit_website." </tr>\n";
$submit_website = $submit_website." <tr><td colspan=\"2\">&nbsp;</td></tr>\n";
$submit_website = $submit_website." <tr>\n";
$submit_website = $submit_website." <td width=\"25%\"><font size=\"2\" face=\"Verdanar\"><b>Reciprocal Link:</b></font></td>\n";
$submit_website = $submit_website." <td width=\"85%\"><font size=\"2\" face=\"Verdana\"><input maxLength=\"255\" size=\"65\" name=\"link\" value=\"http://\"><br><i>(A reciprocal link must exist on a page in your site before you submit. See above for more info.)</i></font></td>\n";
$submit_website = $submit_website." </tr>\n";
$submit_website = $submit_website." <tr><td colspan=\"2\">&nbsp;</td></tr>\n";
$submit_website = $submit_website." <tr>\n";
$submit_website = $submit_website." <td valign=\"top\" width=\"25%\"><font size=\"2\" face=\"Verdanar\"><b>Additional Comments:</b>\n";
$submit_website = $submit_website." <td width=\"85%\"><font size=\"2\" face=\"Verdana\"><i>(Optional. No more than 255 chars.)</i><br><input maxLength=\"255\" size=\"65\" name=\"msg\"></i></font></p>\n";
$submit_website = $submit_website." </font>\n";
$submit_website = $submit_website." </td>\n";
$submit_website = $submit_website." </tr>\n";
$submit_website = $submit_website." <tr>\n";
$submit_website = $submit_website." <td colspan=\"2\">\n";
$submit_website = $submit_website." <center><input type=\"reset\" value=\"Clear\">&nbsp;<input type=\"submit\" value=\"Submit\"></center>\n";
$submit_website = $submit_website." </td>\n";
$submit_website = $submit_website." </tr>\n";
$submit_website = $submit_website." </table></form>\n";

$filename = "footer_template.htm";
$handle = fopen ($filename, "r");
$submit_website_footer = fread ($handle, filesize ($filename));
fclose ($handle);

$submit_website = $submit_website.$submit_website_footer;
$submit_website = $submit_website."</body>\n";
$submit_website = $submit_website."</html>\n";


$fs = fopen("submit_website.html", "w+" ) or die('error when opening the file');
fwrite($fs, $submit_website);
fclose($fs);
echo "done.\n";

// ************************************************** **********************



$fs = fopen("delowner.txt", "w+" ) or die('error when opening the file');
fwrite($fs, $HTTP_GET_VARS['admin_email']);
fclose($fs);

select_link('CAT2',$HTTP_GET_VARS['admin_email'],$admin_website);
?>
<br><br><B>ALL DONE. NEW FILES GENERATED.</B> <BR>Results are place in the current directory. <br><br>
<br>
Click <a href="index.html" target="_bkusa">here (index.html)</a> to see the results - You may need to click refresh on your browser to see the changes.<br>
<br>
<hr align="left" color="CE6500" width="95%">
<font size="2" face="Verdana">
&copy; 2003-2004, <a style="text-decoration: none" href="http://www.170designs.com">170 Designs </a><br></font>
</BODY>
</HTML>




Thanks, if you need more explanation simply reply back, sorry if this was hard to understand.
__________________

Please login or register to view this content. Registration is FREE
170 Designs is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-20-2004, 12:41 PM
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
can you make that a bit longer
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Old 08-20-2004, 12:53 PM
Republikin's Avatar
Defies a Status

Posts: 3,189
Trades: 3
Thats alot of code, I wouldn't even look through it, I would just include a css file with this in it...

a {
text-decoration: none;
}
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Republikin is offline
Reply With Quote
View Public Profile
 
Old 08-20-2004, 01:02 PM
webwoRRks's Avatar
Ultra Talker

Posts: 426
Location: I hope so
Trades: 0
for future reference;

You dont need to do

$my_text = $my_text . "More text";

You just need:

$my_text .= "More text";

That would save you multiple KB's there
__________________
Theres 10 types of people; those who understand binary, and those who don't.
webmaster and webdeveloper resources,
Please login or register to view this content. Registration is FREE
webwoRRks is offline
Reply With Quote
View Public Profile Visit webwoRRks's homepage!
 
Old 08-20-2004, 01:25 PM
Webmaster Talker

Posts: 560
Trades: 0
Quote:
Thats alot of code, I wouldn't even look through it, I would just include a css file with this in it...
Where would you put the css file exactly? Thanks
__________________

Please login or register to view this content. Registration is FREE
170 Designs is offline
Reply With Quote
View Public Profile
 
Old 08-20-2004, 01:33 PM
Republikin's Avatar
Defies a Status

Posts: 3,189
Trades: 3
I imagine that there is a header file somewhere in this script that contains all the stuff in between the <head> and </head> tags. Just include it in there like any other standard css file.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Republikin is offline
Reply With Quote
View Public Profile
 
Old 08-20-2004, 01:34 PM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Trades: 0
Right below your title tags
__________________

Please login or register to view this content. Registration is FREE
- 100 Satisfied Customers - Custom Programming and Web Development
ACJavascript is offline
Reply With Quote
View Public Profile Visit ACJavascript's homepage!
 
Reply     « Reply to PHP Help Needed! Please :)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.45109 seconds with 12 queries