ryan44 Posted October 16, 2012 Share Posted October 16, 2012 Hi. I've been having a tough time trying to add a link anywhere on the hompage or footer and hoping someone can help me out here. All I want to do is add a link to a privacy policy page on the footer, or anywhere on the homepage. I added the link to the footer.php, footer.lib and several other places but it will not display when I upload back to the server. I assume there is some kind of encryption code from the designer somewhere but I can not find it. The site is salesdrive.info...I'm out of options. Anyone help me out here? Thanks, Ryan Quote Link to comment https://forums.phpfreaks.com/topic/269541-add-a-link-to-footerphp/ Share on other sites More sharing options...
Pikachu2000 Posted October 16, 2012 Share Posted October 16, 2012 Posting the URL isn't going to help. We can't see the php code from there. Quote Link to comment https://forums.phpfreaks.com/topic/269541-add-a-link-to-footerphp/#findComment-1385604 Share on other sites More sharing options...
ryan44 Posted October 16, 2012 Author Share Posted October 16, 2012 (edited) Here's the footer.php </div> <div class="cleaner"></div> </div> </div> <div id="rightcolInt"> <a href="/theBook/index.php"><img src="/images/interior/book_image.jpg" alt="Purchase the book" name="buy_book" id="buy_book" onmouseover="this.src='/images/interior/book_image_rl.jpg'" onmouseout="this.src='/images/interior/book_image.jpg'" /></a> <div class="dottedline"></div> <p id="endorsement"> The DriveTest has made our sales recruiting process more precise, allowing us to efficiently filter out individuals who lack the required DNA, and interview only those with a high potential for success." </p> <p id="attribution"><span class="endorser">Mr. Kevin Choksi</span><br/> CEO, WorkForce Software </p> <div class="dottedline"></div> <a href="/theDriveTest/"><img id="drivetest" src="/images/interior/learn_drive_test.gif" onmouseover="this.src='/images/interior/learn_drive_test_rl.gif'" onmouseout="this.src='/images/interior/learn_drive_test.gif'" alt="Learn about the DriveTest" /></a> <p id="moreinfo">For more information<br/> Call us: 312-212-4373<br/> <a href="/Contactus/index.php">Click here to contact us</a></p> </div> <div class="cleaner"></div> </div> <div id="brownstripe"> </div> </div> </div> <div id="footer"> <p>©2007-2012. All rights reserved worldwide SalesDrive, LLC (312) 212-4373 <a href="http://www.salesdrive.info/privacypolicy/" title="SalesDrive - Privacy Policy" target="_blank">Privacy Policy</a></p> </div> </body> </html> Here's the function.php <? Function AdminLoginForm() { global $PageName; ?> <form action="/admin/login.php" method="POST"> <input type="hidden" name="Action" value="Submit"> <table border="0" cellpadding="4" cellspacing="0" class="table"> <tr class="tableheader"><td colspan=2><span class="whitebold">Admin Login</span></td></tr> <tr><td><span class="label">Username:</span></td> <td><input type="text" name="Username" value="" maxlength="200" size="16" class="formfield"></td></tr> <tr><td><span class="label">Password:</span></td> <td><input type="password" name="Password" maxlength="16" size="16" class="formfield"></td></tr> <tr><td></td><td><input type="submit" name="submit" value="LOGIN" class="button"></td></tr> </table></form><? } Function ShowLoginForm() { ?> <form action="/cart/login.php" method="post"> <input type="hidden" name="Action" value="Submit"> <table border="0" cellspacing="0" cellpadding="4" class="table" width="300"> <tr class="tableheader"><td colspan="2">Login to SalesDrive</td></tr> <tr><td><p>Email:</p></td> <td><input type="text" name="Email" size="16" maxlength="255" class="formfield"></td></tr> <tr><td><p>Password:</p></td> <td><input type="password" name="Password" size="16" maxlength="16" class="formfield"></td></tr> <tr><td></td> <td><input type="submit" name="submit" value="LOGIN" class="button"></td></tr> </table></form> <? } //////////////////////////////////////////////////////////////////////////////////// function CheckEmail($weenie) { $host = substr($weenie,strpos($weenie,"@") + 1); if (eregi("^([[:alnum:]_%+=.-]+)@([[:alnum:]_.-]+)\.([a-z]{2,3}|[0-9]{1,3})$",$weenie)) { return true; } else { return false; } } //////////////////////////////////////////////////////////////////////////////////// function cleancopy($c) { $c = ereg_replace("<BR>", "<br />", $c); $c = ereg_replace("<br>", "<br />", $c); $c = ereg_replace("<P>", "", $c); $c = ereg_replace("</P>", "<br />", $c); $c = ereg_replace("<STRONG>", "<strong>", $c); $c = ereg_replace("</STRONG>", "</strong>", $c); $c = ereg_replace("<BLOCKQUOTE>", "<blockquote>", $c); $c = ereg_replace("</BLOCKQUOTE>", "</blockquote>", $c); $c = ereg_replace("</UL>", "</ul>", $c); $c = ereg_replace("</ul>", "</ul><p>", $c); $c = ereg_replace("™", "™", $c); $c = ereg_replace("—", "—", $c); return $c; } ///////////////////////////////////////////////////////////////////////////////// function format_editor($c) { $c = ereg_replace("™", "™", $c); $c = ereg_replace("—", "—", $c); } //////////////////////////////////////////////////////////////////////////////////// function format_date_pretty($inputDate) { //from mysql to pretty, date only $split = explode("-", $inputDate); $outputDate = "" . $split[1] . "/" . $split[2] . "/" . $split[0]; Return $outputDate; } //////////////////////////////////////////////////////////////////////////////////// function NiceDate($in) { $split = explode("-", $in); $output = date("F j, Y",mktime(0,0,0,$split[1],$split[2], $split[0])); return $output; } //////////////////////////////////////////////////////////////////////////////////// function format_date_no_time($in_date) { //for display $splitdate = explode(" ", $in_date); $date = $splitdate[0]; $split = explode("-", $date); $outputDate = "" . $split[1] . "." . $split[2] . "." . $split[0]; return $outputDate; } //////////////////////////////////////////////////////////////////////////////////// function format_date_time_pretty($in_date) { //from mysql to pretty with time global $timediff; If ($in_date != "") { $splitdate = explode(" ", $in_date); $date = $splitdate[0]; $time = $splitdate[1]; $timesplit = explode(":", $time); $hour = $timesplit[0] + $timediff; $minute = $timesplit[1]; $time = $hour . ":" . $minute; $split = explode("-", $date); $outputDate = "" . $split[1] . "." . $split[2] . "." . $split[0]; $outputDate .= " at " . $time; } else { $outputDate = "N/A"; } Return $outputDate; } //////////////////////////////////////////////////////////////////////////////////// Function WriteAnyDropDown($Current, $Which) { PRINT "<select name=\"" . $Which . "\">"; $Current = trim($Current); If ($Current == 1 ) { PRINT "<option value=\"1\" selected>$Which</option> <option value=\"0\">Not $Which</option>"; } elseif ($Current == 0 ) { PRINT "<option value=\"1\">$Which</option> <option value=\"0\" selected>Not $Which</option>"; } else { PRINT "<option value=\"0\" select>-- SELECT ONE --</option> <option value=\"1\">$Which</option> <option value=\"0\">Not $Which</option>"; } PRINT "</select>"; } //////////////////////////////////////////////////////////////////////////////////// function extract_int ($str) { ereg ('[^0-9]*([0-9]+)[^0-9]*', $str, $regs); return (intval ($regs[1])); } //////////////////////////////////////////////////////////////////////////////////// function FormatPhone( $PhoneNumber ) { $PhoneNumber = ereg_replace( "[^0-9]", "", $PhoneNumber ); // Strip out non-numerics if( ereg( "^([0-9]{3})([0-9]{3})([0-9]{4})$", $PhoneNumber, $NumberParts ) ) return "(" . $NumberParts[1] . ") " . $NumberParts[2] . "-" . $NumberParts[3]; else return false; } //////////////////////////////////////////////////////////////////////////////////// function format_date_only($date) { //get it ready for Mysql $date = str_replace("/", "-", $date); $date = str_replace(".", "-", $date); $split = explode("-", $date); $newdate = $split[2] . "-" . $split[0] . "-" . $split[1]; return $newdate; } //////////////////////////////////////////////////////////////////////////////////// function isdate($date) { if (ereg ("([0-9]{1,2})-([0-9]{1,2})-([0-9]{4})", $date, $regs) OR ereg ("([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})", $date, $regs)) { return false; } else { return true; } } //////////////////////////////////////////////////////////////////////////////////// /* used to ensure that the content is okay for the content editor */ function RTESafe($strText) { //returns safe code for preloading in the RTE $tmpString = trim($strText); //convert all types of single quotes $tmpString = str_replace(chr(145), chr(39), $tmpString); $tmpString = str_replace(chr(146), chr(39), $tmpString); $tmpString = str_replace("'", "'", $tmpString); //convert all types of double quotes $tmpString = str_replace(chr(147), chr(34), $tmpString); $tmpString = str_replace(chr(148), chr(34), $tmpString); // $tmpString = str_replace("\"", "\"", $tmpString); //replace carriage returns & line feeds $tmpString = str_replace(chr(10), " ", $tmpString); $tmpString = str_replace(chr(13), " ", $tmpString); $tmpString = str_replace("™", chr(169), $tmpString); return $tmpString; } ///////////////////////////////////////////////////////////////////////////////// function DoHTMLEntities ($string) { $trans_tbl = get_html_translation_table (HTML_ENTITIES); // MS Word strangeness.. // smart single/ double quotes: $trans_tbl[chr(145)] = '\''; $trans_tbl[chr(146)] = '\''; $trans_tbl[chr(147)] = '"'; $trans_tbl[chr(148)] = '"'; // ? : $trans_tbl[chr(142)] = 'é'; return strtr ($string, $trans_tbl); } ///////////////////////////////////////////////////////////////////////////////// function encode_everything($string){ $encoded = ""; for ($n=0;$n<strlen($string);$n++){ $check = htmlentities($string[$n],ENT_QUOTES); $string[$n] == $check ? $encoded .= "".ord($string[$n]).";" : $encoded .= $check; } return $encoded; } ///////////////////////////////////////////////////////////////////////////////// function unhtmlentities( $string ){ $trans_tbl = get_html_translation_table ( HTML_ENTITIES ); $trans_tbl = array_flip( $trans_tbl ); $ret = strtr( $string, $trans_tbl ); return preg_replace( '/(\d+);/me' , "chr('\\1')" , $ret ); } /////////////////////////////////////////////////////////////////////////////////////////////////// function cleancard($c){ $c = trim($c); $c = str_replace("-","",$c); $c = str_replace(" ","",$c); return $c; } /////////////////////////////////////////////////////////////////////////////////////////////////// function EmailCard($card){ $length = strlen($card); $right4 = substr($card, $length-4, $length); return $right4; } /////////////////////////////////////////////////////////////////////////////////////////////////// Function WriteCreditCardBox($URL, $Amount, $OrderID) { global $db, $ILSalesTax, $ShippingCost, $CustomerID, $CartID, $Address, $City, $State, $Zip, $DiscountAmount, $Subscriber; ?> <form action="<?=$URL?>" method="POST"> <input type="hidden" name="action" value="submit"> <input type="hidden" name="CartID" value="<?=$CartID?>"> <input type="hidden" name="Amount" value="<?=$Amount?>"> <input type="hidden" name="OrderID" value="<?=$OrderID?>"> <input type="hidden" name="CustomerID" value="<?=$CustomerID?>"> <input type="hidden" name="ShippingCost" value="<?=$ShippingCost?>"> <input type="hidden" name="ILSalesTax" value="<?=$ILSalesTax?>"> <input type="hidden" name="DiscountAmount" value="<?=$DiscountAmount?>"> <p class="required">Required fields are noted in red.</p> <table border="0" cellspacing="0" cellpadding="4" class="table" width="350" align="center"> <tr class="tableheader"><td colspan="3">Credit Card Information</td></tr> <tr><td><span class="required">Credit Card:</span></td> <td><select name="cctype" class="formfield"> <option value="VI">Visa</option> <option value="MC">MasterCard</option> <option value="AE">American Express</option> <option value="DC">Discover</option> </select></td></tr> <tr><td><span class="required">Expiration:</span></td> <td><select name="expMonth" class="formfield"> <option value="01">Jan</option> <option value="02">Feb</option> <option value="03">Mar</option> <option value="04">Apr</option> <option value="05">May</option> <option value="06">Jun</option> <option value="07">Jul</option> <option value="08">Aug</option> <option value="09">Sep</option> <option value="10">Oct</option> <option value="11">Nov</option> <option value="12">Dec</option></select> / <select name="expYear" class="formfield"> <option value="11">2011</option> <option value="12">2012</option> <option value="13">2013</option> <option value="14">2014</option> <option value="15">2015</option> <option value="16">2016</option> <option value="17">2017</option> </select></td></tr> <tr><td> </td> <td><span class="small">Month / Year</span></td></tr> <tr><td><span class="required">Card Number:</span></td> <td><input type="text" name="cardnumber" size="30" class="formfield"></td></tr> <tr><td colspan="3" class="tableheader">Address Verification</td></tr> <tr><td colspan="3"><span class="small">Verify your credit card billing address.</span></td></tr> <tr><td><span class="required">Cardholder Address:</span></td> <td><input type="text" name="Address" size="30" value="<?=$Address?>" maxlength="255" class="formfield"></td></tr> <tr><td><span class="required">City:</span></td> <td><input type="text" name="City" size="30" maxlength="50" value="<?=$City?>" class="formfield"> </td></tr> <tr><td><span class="required">State:</span></td> <td><? WriteStateDropDown($State);?></td></tr> <tr><td><span class="required">Zip Code:</span></td> <td><input type="text" name="ZipCode" value="<?=$Zip?>" size="5" class="formfield"></td></tr> <tr><td> </td> <td><input type="submit" name="submit" value="PROCESS ORDER" class="button" onclick="this.form.submit.value='Please Wait!';"></form></td></tr></table> <? } //END Function //////////////////////////////////////////////////////////////////////////////////// Function GetSalesTax($CartID) { global $db; $ILSalesTax = 0; IF ($results = $db->get_results("SELECT c.Quantity*c.Price as ext FROM tblProducts p INNER JOIN tblCartItems c ON p.ID = c.ProductID WHERE c.CartID = '$CartID' AND c.ProductID='1'")) { foreach($results as $r) { $Cost = $r->ext; $thistax = $Cost * .07; $ILSalesTax = $ILSalesTax + $thistax; } $ILSalesTax = number_format($ILSalesTax, 2, '.', ''); } else { $ILSalesTax = 0; } return $ILSalesTax; } //////////////////////////////////////////////////////////////////////////////////// Function WriteCartItems($CartID, $Editable) { global $db, $Final, $ShippingCost, $ILSalesTax, $OrderTotal, $DiscountCode; $ShippingNeeded = 0; IF ($registered = $db->get_results("SELECT c.ID, p.ID as ProductID, p.ProductName, c.Quantity, c.Price, c.Quantity*c.Price as ext FROM tblProducts p INNER JOIN tblCartItems c ON p.ID = c.ProductID WHERE c.CartID = '$CartID' ORDER BY c.DateAdded")) { $count = 0; ?> <table border="0" cellspacing="0" cellpadding="4" class="table" width="450" align="center"> <tr class="tableheader"><td nowrap="nowrap">Product Name</td> <td nowrap="nowrap">Price Ea.</td> <td nowrap="nowrap">Quantity</td> <td nowrap="nowrap">Total Price</td> <? IF ($Editable == "AllowEdits") { ?> <td>Remove</td> <? } Print "</tr>"; foreach($registered as $r) { $ID = $r->ID; $ProductID = $r->ProductID; If ($ProductID == 1) { $ShippingNeeded = 1; } $Product = $r->ProductName; $Price = $r->Price; $Quantity = $r->Quantity; $ext = $r->ext; IF ($DiscountCode == "PIIAIOffer" OR $DiscountCode == "piiaioffer") { $Price = 9.95; $ext = $Quantity * $Price; $db->query("UPDATE tblCartItems SET Price='$Price' WHERE CartID='$CartID'"); } ?> <tr><td valign="top"><?=$Product?> <input type="hidden" name="ProductID-<?=$count?>" value="<?=$ProductID?>"></td> <td valign="top" align="right">$<?=$Price?></td> <td valign="top" align="center"><? If ($Editable == "NoEdits") { PRINT "$Quantity"; } else { PRINT "<input type=\"text\" name=\"Quantity-".$count."\" value=\"$Quantity\" size=\"3\" class=\"formfield\">"; }//endif editable PRINT "<td valign=\"top\" align=\"right\">$". $ext . "</td>"; If ($Editable == "AllowEdits") { ?> <input type="hidden" name="ID-<?=$count?>" value="<?=$ID?>"></td> </td> <td valign="top"><a href="/cart/index.php?Action=Delete&ID=<?=$ID?>&Product=<?=$Product?>">Remove</a></td></tr> <? } $count++; } //end foreach IF($Editable == "AllowEdits") { ?> <tr><td colspan="6" align="center"> <input type="hidden" name="count" value="<?=$count?>"> <input type="submit" name="submit" class="button" value="UPDATE CART"></form> <br> <br> <form action="/cart/checkout.php" method="get"> <input type="submit" name="submit" class="button" value="CHECKOUT »"> </form> </td></tr></table> <? } else { IF ($Final == 1) { IF ($ShippingCost != "0" && $ShippingCost != "") { $displayShippingCost = currency($ShippingCost); PRINT "<tr><td colspan=\"3\" align=\"right\">Shipping Cost:</td> <td align=\"right\">".$displayShippingCost ."</td></tr>"; } IF ($ILSalesTax != "0" & $ILSalesTax != "") { $displayILSalesTax = currency($ILSalesTax); PRINT "<tr><td colspan=\"3\" align=\"right\">Illinois Sales Tax (7%):</td> <td align=\"right\">".$displayILSalesTax."</td></tr>"; } $displayOrderTotal = currency($OrderTotal); PRINT "<tr><td colspan=\"3\" align=\"right\"><strong>Order Total:</strong></td> <td align=\"right\">".$displayOrderTotal."</td></tr>"; } PRINT "</table>"; }//end if eidtable } Else { //rs.eof //$db->debug(); ?> <p>Your cart is currently empty. Choose <a href="/theBook/index.php">products</a> to add.</p> <? } //end if IF ($ShippingNeeded == 1) { return 1; } } //End function //////////////////////////////////////////////////////////////////////////////////// Function WriteAddress($CustomerID) { global $db; $r = $db->get_row("SELECT * FROM tblCustomer WHERE ID='$CustomerID'"); while(list($name,$value) = each($r)) { //name all values $$name = $value; }; $Name = $FName . " " . $LName; IF ($Address2 != "") { $Address .= "<br>".$Address2;} $Address .= "<br>" . $City . ", " . $State . " " . $Zip; IF ($CountryCode != "US") { $Address .= "<br>".$CountryCode;} ?> <table border="0" cellpadding="4" cellspacing="0" class="table" width="500" align="center"> <tr><td colspan="2" class="tableheader">Ordered By</td></tr> <tr><td>Name:</td> <td><?=$Name?></td></tr> <tr><td>Title:</td> <td><?=$Title?></td></tr> <tr><td>Company:</td> <td><?=$Company?></td></tr> <tr><td valign="top">Address:</td> <td><?=$Address?></td></tr> <tr><td>Telephone:</td> <td><?=$Phone?></td></tr> <tr><td>Fax:</td> <td><?=$Fax?></td></tr> <tr><td>Email:</td> <td><?=$Email?></td></tr> </table> <? } //////////////////////////////////////////////////////////////////////////////////// function WriteDropDown($VarName, $Current,$TableName) { $query = "SELECT * FROM tbl".$TableName ; $result = mysql_query($query) or die ("Error in query: " . $query . mysql_error()); $number = MYSQL_NUMROWS($result); $i = 0; IF ($number > 0) { PRINT "<select name=\"".$VarName . "\" class=\"formfield\">"; If ($Current == 0 ) { PRINT "<option value=\"0\" selected>SELECT ONE</option>"; } WHILE ($i < $number): $ID = mysql_result($result,$i,"ID"); $ThisName = mysql_result($result,$i,$TableName); IF ($Current == $ID) { PRINT "<option value=\"" . $ID . "\" selected>" . $ThisName . "</option>"; } else { PRINT "<option value=\"" . $ID . "\">" . $ThisName . "</option>"; } $i++; ENDWHILE; PRINT "</select>"; } } //////////////////////////////////////////////////////////////////////////////////// function WriteCountryDropDown($Current) { global $db; IF ($countries = $db->get_results("SELECT CountryCode, CountryName FROM tblCountry ORDER BY CountryName")) { PRINT "<select name=\"CountryCode\" id=\"CountryCode\" class=\"formfield\">"; If ($Current == "0") { PRINT "<option value=\"0\">- SELECT -</option>"; } foreach($countries as $c) { $CountryCode = $c->CountryCode; $CountryName = $c->CountryName; PRINT "<option value=\"$CountryCode\""; IF ($Current == $CountryCode) { PRINT " selected"; } PRINT ">$CountryName</option>"; }//end foreach PRINT "</select>"; }//end if }//end function //////////////////////////////////////////////////////////////////////////////////// function GeneratePassword ($length = { $password = ""; $possible = "0123456789bcdfghjkmnpqrstvwxyz"; $i = 0; while ($i < $length) { $char = substr($possible, mt_rand(0, strlen($possible)-1), 1); if (!strstr($password, $char)) { $password .= $char; $i++; } } return $password; } //////////////////////////////////////////////////////////////////////////////////// function WriteStateDropDown($CurrentState) { global $db; $results = $db->get_results("SELECT ID FROM tblState"); PRINT "<select name=\"State\" class=\"formfield\">"; IF ($CurrentState == "") { PRINT "<option value=\"\">Select One</option>";} foreach($results as $r) { $StateID = $r->ID; IF ($CurrentState == $StateID) { $selected = " selected"; } else { $selected = ""; } PRINT "<option value=\"$StateID\"$selected>$StateID</option>"; } PRINT "</select>"; } //////////////////////////////////////////////////////////////////////////////////// function currency($num) { $num = "\$".number_format($num,2,'.',','); return $num; } ?> Edited October 16, 2012 by ManiacDan Quote Link to comment https://forums.phpfreaks.com/topic/269541-add-a-link-to-footerphp/#findComment-1385607 Share on other sites More sharing options...
ManiacDan Posted October 16, 2012 Share Posted October 16, 2012 I see a privacy policy link right there in your code, why do you believe it's not showing up right? Did your host not accept the files? Are you clearing your browser cache? Quote Link to comment https://forums.phpfreaks.com/topic/269541-add-a-link-to-footerphp/#findComment-1385614 Share on other sites More sharing options...
ryan44 Posted October 16, 2012 Author Share Posted October 16, 2012 (edited) Yeah, it's in the code, but when I upload the edited file back to the server (via ftp) the changes do not show up. I was using dreamweaver to edit, but if I log into the hostgator cpanel and look at the files, it shows the "<a href="http://www.salesdriv...privacypolicy/" title="SalesDrive - Privacy Policy" target="_blank">Privacy Policy</a></p>" code there but won't display. I cleared my cache, tried several browsers etc. just can't see it. Hate to admit it, but I've spent hours trying to figure this out. Same deal with the text block on the homepage. I tried adding the link at the end of the text block and it wwon't display when uploaded. EDIT: I was looking through the SQL files to thinking it might be pulling from there but couldn't find it. Here's the source code once I re-up the edited file...the link I added is gone. <div id="footer"><!-- #BeginLibraryItem "/Library/footer.lbi" --> <p>©2007-2012. All rights reserved worldwide SalesDrive, LLC (312) 212-4373. Web site by <a href="http://www.hypeinc.com" target="popup">Hype, Inc.</a></p> <!-- #EndLibraryItem --></div> </body> <!-- InstanceEnd --></html> Edited October 16, 2012 by ryan44 Quote Link to comment https://forums.phpfreaks.com/topic/269541-add-a-link-to-footerphp/#findComment-1385615 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.