Lifes -Essentials The full List
        LeSearch
 
 

$popular Most Popular Links

"; echo "

> Home > Popular Links

"; $sql_rqst="SELECT * FROM links WHERE approved='yes' ORDER BY clicks DESC LIMIT 0,".$popular; } else if($list_type=="date_added") { echo "

$new Newest Links

"; echo "

> Home > Newest Links

"; $sql_rqst="SELECT * FROM links WHERE approved='yes' ORDER BY id DESC LIMIT 0,".$new; } else { $catcont=$_GET["catcont"]; $formcatcont=$_GET["catcont"]; $sub_id=$catcont; $trail_idarray=""; $trail_namearray=""; $trail_count=0; $list_type="norm"; while($sub_id != 0) { $trail_result = MySQLQuery("SELECT * FROM links_cat WHERE id=$sub_id", $QueryError_Email,$QueryError_Browser); while($trail_row = mysql_fetch_array($trail_result)) { if($trail_count==0) {$add_ok=$trail_row["cadd"];} if($trail_count > 0) { $trail_idarray.=","; $trail_namearray.=","; } $trail_idarray.=$trail_row["id"]; $trail_namearray.=$trail_row["name"]; $sub_id=$trail_row["sub_cat"]; if($trail_count==0){$cat_name=$trail_row["name"];} $trail_count=$trail_count+1; } } $trail_idcheck=preg_split('/,/',$trail_idarray); $trail_namecheck=preg_split('/,/',$trail_namearray); $trail_run=sizeof($trail_idcheck); $trail="

> Home"; while($trail_run > 0) { $trail_run=$trail_run-1; $cur_id=$trail_idcheck[$trail_run]; $cur_name=$trail_namecheck[$trail_run]; if($trail_run==0) { $trail.=" > ".$cur_name.""; } else { $trail.=" > ".$cur_name.""; } } $trail.="

"; echo $trail; echo "

$dsc

"; $result = MySQLQuery("SELECT id,sub_cat,name FROM links_cat WHERE sub_cat=$catcont ORDER BY name ASC", $QueryError_Email,$QueryError_Browser); if(mysql_num_rows($result)) { while($row=mysql_fetch_array($result)) { $id=$row["id"]; $name=$row["name"]; $link_count = MySQLQuery("SELECT * FROM links WHERE catcont='".$id."' AND approved='yes' ORDER BY name ASC", $QueryError_Email,$QueryError_Browser); $link_count=mysql_num_rows($link_count); if($link_count==0){$link_text="empty";}else{$link_text="details";} echo " $name ($link_text) \n"; } } if(!isset($start)){$start = 0;} $sql_rqst="SELECT * FROM links WHERE catcont=".$_GET["catcont"]." AND approved='yes' ORDER BY ".$list_by." ".$list_order." LIMIT ".$start.",".$category; $page_result = MySQLQuery("SELECT * FROM links WHERE catcont=$catcont",$QueryError_Email,$QueryError_Browser); $previous_page=$start - $category; $next_page=$start + $category; $numrows=mysql_num_rows($page_result); if(($start > 0) || ($numrows > ($start + $category))){echo "

";} if($start > 0){echo "[ < < Previous ]\n";} if($numrows > ($start + $category)){echo "[ Next > > ]\n";} if(($start > 0) || ($numrows > ($start + $category))){echo "

";} } $result = MySQLQuery($sql_rqst,$QueryError_Email,$QueryError_Browser); while($row = mysql_fetch_array($result)) { $id=$row["id"]; $name=$row["name"]; $clicks=$row["clicks"]; $approved=$row["approved"]; $url=$row["url"]; $dsc=$row["dsc"]; $date_added=$row["date_added"]; $year = substr($date_added, 0, 4); $month = substr($date_added, 5, 2); $day = substr($date_added, 8, 2); $date_added=date($display_format,mktime("00","00","00",$month,$day,$year)); $image=$row["image"]; $rating=$row["rating"]; $rates=$row["rates"]; if($image_enabled=="yes" && $image) { $image=""; } else { $image=""; } if($rates=="" || $rates=="0") { $rate_stat="No Rate"; } else { $rating=$rating / $rates; $rating=round($rating,1); if ($rating >= 9) {$ratepic="•••••";} else if ($rating >= 7) {$ratepic="••••-";} else if ($rating >= 5) {$ratepic="•••--";} else if ($rating >= 3) {$ratepic="••---";} else if ($rating >= 1) {$ratepic="•----";} $rate_stat=$rating. "(" .$ratepic. ")"; } if($clicks==""){$clicks="0";} if($new_window=="yes") { $onclick=" onclick=\"window.open('".$_SERVER["PHP_SELF"]."?ax=out&id=".$id."','','');return false;\""; } else { $onclick=""; } ?>

>
|";} if($show_date=="yes"){echo " Added: $date_added |";} if($show_clicks=="yes"){echo " Total Clicks: $clicks |";} if($show_rating=="yes"){echo " Rating: $rate_stat | Rate This Website |";} if($show_deadlink=="yes"){echo " Notify of Dead Link |";} if($show_date=="yes" || $show_clicks=="yes" || $show_rating=="yes" || $show_deadlink=="yes"){echo "";} ?>

?ax=addrate&id=&catcont=&l=" method="post" id="form" onsubmit="return validate_rate();">Rate This Website

0) || ($numrows > ($start + $category))){echo "

";} if($start > 0){echo "[ < < Previous ]\n";} if($numrows > ($start + $category)){echo "[ Next > > ]\n";} if(($start > 0) || ($numrows > ($start + $category))){echo "

";} if ($add_ok =="y") { echo "

[ Add Your Link | Edit Your Link ]

"; } } } else if($ax=="out") { $result = MySQLQuery("SELECT id,url,clicks FROM links WHERE id=".$_GET["id"],$QueryError_Email,$QueryError_Browser); while($row = mysql_fetch_array($result)) { $id=$row["id"]; $url=$row["url"]; $clicks=$row["clicks"]; $clicks=$clicks+1; $up_clicks = MySQLQuery("UPDATE links SET clicks='$clicks' WHERE id='$id'",$QueryError_Email,$QueryError_Browser); ob_end_clean(); header("Location: ".$url); } } else if($ax=="deadlink") { if($_POST["v"]=="y") { $result = MySQLQuery("SELECT id,name,url FROM links WHERE id=".$_POST["r_id"]."",$QueryError_Email,$QueryError_Browser); while($row = mysql_fetch_array($result)) { $id=$row["id"]; $url=$row["url"]; $name=$row["name"]; if(getenv(HTTP_X_FORWARDED_FOR)){$user_ip=getenv(HTTP_X_FORWARDED_FOR);}else{$user_ip=getenv(REMOTE_ADDR);} $message="$name\n$url\nis being reported as a dead link in the links directory at $site_title.\n\nThe report was sent from $user_ip"; mail("$admin_mail","Dead Link Report from $site_title","$message","From: $admin_mail"); echo "

Thank You

"; echo "

> Home > Report Dead Link

"; echo "

You have reported "$name" linked to $url as being a dead link in our directory.

"; echo "

This message has been sent to the web site administrator, thank you for your help.

"; } } else { $result = MySQLQuery("SELECT id,name,url FROM links WHERE id=".$_GET["id"]."",$QueryError_Email,$QueryError_Browser); while($row = mysql_fetch_array($result)) { $id=$row["id"]; $url=$row["url"]; $name=$row["name"]; echo "

Are You Sure?

"; echo "

> Home > Are You Sure?

"; echo "

Are you sure you want to report $name as being a dead link? You can try once more by clicking here (which will try to load the page once more in a new window).

"; echo "

"; } } } else if($ax=="addrate") { $id=$_GET["id"]; $catcont=$_GET["catcont"]; $new_rating=$_POST["rating"]; $list_type=$_GET["l"]; $result = MySQLQuery("SELECT id,rating,rates FROM links WHERE id=$id;",$QueryError_Email,$QueryError_Browser); while($row = mysql_fetch_array($result)) { $rating=$row["rating"]; $rating=$rating + $new_rating; $rates=$row["rates"]; $rates=$rates + 1; $up_clicks = MySQLQuery("UPDATE links SET rating='$rating',rates='$rates' WHERE id='$id'",$QueryError_Email,$QueryError_Browser); echo "

Thanks for your input

\n"; echo "

> Home > Rating

"; echo "

Your rating has been added, thank you.

\n"; } if($list_type=="norm") { $sub_result = MySQLQuery("SELECT id,sub_cat FROM links_cat WHERE id=".$catcont."",$QueryError_Email,$QueryError_Browser); while($sub_row = mysql_fetch_array($sub_result)) { $id=$sub_row["id"]; $subcat=$sub_row["sub_cat"]; if($subcat==0){$subcat=$id;} echo "

To return to the page you were at, click here.

\n"; } } else if($list_type=="s") { echo "

To return to the page you were at, click here.

\n"; } else { echo "

To return to the page you were at, click here.

\n"; } } ////////////////// // Search Function ////////////////// else if ($ax=="search") { $rf=$_GET["rf"]; echo "

Search Results

"; echo "

> Home > Search Results

"; if(!isset($start)) { $start = 0; if($rf=="s") { $search_for=$_GET["q"]; } else { $search_for=$_POST["search_for"]; } } else { if($rf=="s") { $search_for=$_GET["q"]; } else { $search_for=$_POST["search_for"]; } } $result = MySQLQuery("SELECT * FROM links WHERE (name LIKE '%".$search_for."%' OR url LIKE '%".$search_for."%' OR dsc LIKE '%".$search_for."%') AND approved='yes' ORDER BY name ASC LIMIT $start,$search",$QueryError_Email,$QueryError_Browser); $page_result = MySQLQuery("SELECT * FROM links WHERE (name LIKE '%".$search_for."%' OR url LIKE '%".$search_for."%' OR dsc LIKE '%".$search_for."%') AND approved='yes' ORDER BY id DESC",$QueryError_Email,$QueryError_Browser); $previous_page=$start - $search; $next_page=$start + $search; $numrows=mysql_num_rows($page_result); echo "

Total of $numrows Records Returned

"; if(($start > 0) || ($numrows > ($start + $search))){echo "

";} if($start > 0){echo "[ < < Previous ]\n";} if($numrows > ($start + $search)){echo "[ Next > > ]\n";} if(($start > 0) || ($numrows > ($start + $search))){echo "

";} while($row = mysql_fetch_array($result)) { $id=$row["id"]; $name=$row["name"]; $clicks=$row["clicks"]; $approved=$row["approved"]; $url=$row["url"]; $dsc=$row["dsc"]; $date_added=$row["date_added"]; $year = substr($date_added, 0, 4); $month = substr($date_added, 5, 2); $day = substr($date_added, 8, 2); $date_added=date($display_format,mktime("00","00","00",$month,$day,$year)); $image=$row["image"]; $rating=$row["rating"]; $rates=$row["rates"]; if($image_enabled=="yes" && $image) { $image=""; } else { $image=""; } if($rates=="" || $rates=="0") { $rate_stat="Not Yet Rated"; } else { $rating=$rating / $rates; $rating=round($rating,2); $rate_stat=$rating." out of 10 (".$rates." Ratings)"; } if($clicks==""){$clicks="0";} if($new_window=="yes") { $onclick=" onclick=\"window.open('".$_SERVER["PHP_SELF"]."?ax=out&id=".$id."','','');return false;\""; } else { $onclick=""; } ?>

?ax=out&id="> |";} if($show_date=="yes"){echo " Added: $date_added |";} if($show_clicks=="yes"){echo " Total Clicks: $clicks |";} if($show_rating=="yes"){echo " Rating: $rate_stat | Rate This Website |";} if($show_deadlink=="yes"){echo " Notify of Dead Link |";} if($show_date=="yes" || $show_clicks=="yes" || $show_rating=="yes" || $show_deadlink=="yes"){echo "";} ?>

?ax=addrate&id=&catcont=&l=s&q=" method="post" id="form" onsubmit="return validate_rate();">Rate This Website

0) || ($numrows > ($start + $search))){echo "

";} if($start > 0){echo "[ < < Previous ]\n";} if($numrows > ($start + $search)){echo "[ Next > > ]\n";} if(($start > 0) || ($numrows > ($start + $search))){echo "

";} } /////////////////////////// // Add and Insert Functions /////////////////////////// else if($ax=="add") { if (empty ($catcount)) { echo "

No category selected - Please select available category and try again.

"; }else{ $catcont=$_GET["catcont"]; $date_added=date($date_format); $result=MySQLQuery("select * from links_cat where id=$catcont order by name",$QueryError_Email,$QueryError_Browser); while($row=mysql_fetch_array($result)) { $catcont=$row["id"]; $cat_name=$row["name"]; } // security code $_SESSION["safeCode"] = null; $_SESSION["safeCode"] = ""; $chars = "ABCDEFGHIJKLMNOPRSTUVWXYZ"; for ($i=0;$i

Add a Link

> ">Home > Add a Link

All Fields are required for link submission. If the wrong category was chosen for your listing,
browse to the category you wish to add your listing to, and click the "Add a link" link in that category.
We advise to refresh this page before filling in to generate a clear security code.

?ax=insert" method="post" id="form" onsubmit="return validate_add();">
In Category:    - Please read about rules and express inclusion here
Website Name*:((100 characters))
Website Description*: (255 characters)

URL*:
Image url:
Invite code - paypal code:
or type free

Email:

Sec-code (Please key in the generated code)
   

* - indicates required field

There is absolutely no requirement to link back specifically if you have used the express (paid) submission.
All accepted entries do link directly to their sites no redirects or other "gimmicks".
Java is only used for ratings and dead link.
Sites and associates from the life's essentials network
will pick their primary link partners from here.

The Link Was Added

"; echo "

Home > Link Added

"; if($admin_approved=="no") { echo "

Your link request has been sent to the site administrator for approval.

"; echo "

You will receive an update in due course.

"; } else { echo "

Your link has been added to the directory.

"; echo "

An email has also been sent to you.

"; } } else { echo "

Home > Error Adding Link

Error Adding Link

"; } }else{ echo "Security code mismatch - pls use back button on your browser and try again
"; echo "This code is mandatory to avoid automated submissions"; } } ////////////////////////////// // Login and Editing Functions ////////////////////////////// else if($ax=="login") { ?>

Edit Your Listing

> ">Home > Edit Login

?ax=editlogin" method="post" id="form" onsubmit="return validate_login();">
URL*:
Email*:
Password*:
* - indicates required field
?ax=remind">Forget your login info?

Edit a Link

> ">Home > ">Edit Login > Edit

?ax=update&id=" method="post" name="form" onsubmit="return validate_edit();">
*Category:
Website Name*:
Website Description*:
URL*:
Image URL:
Email:
Password:
* - indicates required field
No Records Found

"; echo "

No web site listing can be found with that URL, email address or password.

"; echo "

Click here to get login info for all websites listed to your email address sent to you.

"; } } else if($ax=="update") { $catcont=$_POST["catcont"]; $name=$_POST["name"]; $dsc=$_POST["dsc"]; $url=$_POST["url"]; $email=$_POST["email"]; $password=$_POST["password"]; $image=$_POST["image"]; $result=MySQLQuery("update links set catcont='$catcont', name='$name', dsc='$dsc', url='$url', email='$email', password='$password', image='$image' where id=$id",$QueryError_Email,$QueryError_Browser); if ($result) { mail($admin_mail, "Link was modified at ".$site_title."", "The link ".$name." has been modified at ".$site_title."", "From: ".$admin_mail); if ($email && $password) { mail($email, "Link modified at ".$site_title."", "Your link has been modified.\n\nThanks for keeping it up to date.", "From: ".$noreply_mail); } echo "

The Link Was Updated

"; echo "

Home > Edit Login > Edit > $name Updated

"; echo "

Your link update has been changed and the site administrator has been notified of the change.

"; echo "

Your listing will remain in the directory during this time.

"; } else { echo "

Error Updating Link

"; } } ////////////////////////////// // Password Reminder Functions ////////////////////////////// else if($ax=="remind") { ?>

Get Your Login Information

This will email you the login information for all URL's that have been submitted by the requested email address

?ax=remindmail" method="post" id="form" onsubmit="return validate_remind();">
Email:
Email Sent

Your Login Information has been sent to $email.

"; } else { echo "

No Records Found

Sorry, no records were found registered to $email.

"; } } ////////////////// // Main Front Page ////////////////// else { $result = MySQLQuery("SELECT id,sub_cat,name,dsc FROM links_cat WHERE sub_cat='0' ORDER BY name ASC", $QueryError_Email,$QueryError_Browser); $count=0; if(mysql_num_rows($result)) { echo "\n"; while($row=mysql_fetch_array($result)) { $count=$count+1; $id=$row["id"]; $sub_cat=$row["sub_cat"]; $name=$row["name"]; $dsc=$row["dsc"]; $link_count = MySQLQuery("SELECT * FROM links WHERE catcont='".$id."' AND approved='yes' ORDER BY name ASC", $QueryError_Email,$QueryError_Browser); $link_count=mysql_num_rows($link_count); if($link_count==1){$link_text="link";}else{$link_text="links";} if($count <= $front_cols && $count==1){echo "\n\n\n\n";} else if($count < $front_cols && $count > 1){echo "

\n\n";} else if($count==$front_cols){echo "

\n\n";} if($count==$front_cols){$count=0;} } if($count < $front_cols) { $spacer=($front_cols - $count) * 2; echo "\n\n"; } echo "\n
\n";} else if($count < $front_cols && $count > 1){echo "  \n";} else if($count==$front_cols){echo "  \n";} echo "$name ($link_count $link_text)
$dsc
\n"; if($count <= $front_cols && $count==1){echo "

\n
  
\n"; } else { echo "

No categories found

"; } if($show_total=="yes") { $result = MySQLQuery("SELECT * FROM links WHERE approved='yes'",$QueryError_Email,$QueryError_Browser); $total_links=mysql_num_rows($result); echo "

$site_title has a total of $total_links links in the directory.

"; } } ?>