The database server is offline. Try again shortly.","If the problem persists, contact the system administrator.")); mysql_select_db($EasyBookmarker["mysql_base"]) or Die (bmError("Problem!","
The database is down for maintenance. It takes about 2 minutes to complete.","If the problem persists, contact the system administrator.")); if (isset($follow_link)) { bmMyQuery("UPDATE ezine_link_bmlink SET Hits=Hits+1, Visit='".date("Y-m-d")."' WHERE ID=$follow_link;"); $Link=bmMyFetch("SELECT LUrl From ezine_link_bmlink WHERE ID=$follow_link;"); Header("Location: ".$Link["LUrl"]); exit; } // ******************************************************************** // ********************** Functions // ******************************************************************** // include_once "functions.php"; // (Mark 2) function bmError($Heading="Error!",$Error="",$Solution="") { return "
$Heading

".mysql_error()."$Error

$Solution

"; } // function Error function bmTr($width=1,$height=1) { return ""; } function bmElement($Element="default",$Arg1="default",$Arg2="default",$Arg3="default",$Arg4="default",$Arg5="default",$Arg6="default") { switch ($Element) { case "form" : // Element, Action, Name, Method, Aditional $Action=$Arg1; $Name=$Arg2; $Method=$Arg3; $Aditional=$Arg4; if ($Name=="default") $Name="my"; if ($Method=="default") $Method="POST"; if ($Aditional=="default") { $Aditional=""; } else { $Aditional=" ".$Aditional; } return "
\n"; break; case "hidden" : // Element, Name, Value $Name=$Arg1; $Value=$Arg2; if ($Value=="default") $Value=""; return "\n"; break; case "text" : // Element, Name, Value, Width, Aditional, Class $Name=$Arg1; $Value=$Arg2; $Width=$Arg3; $Aditional=$Arg4; $Class=$Arg5; if (strpos($Name,"[")===FALSE) { $ID=""; } else { $Tmp=split("\[",$Name); $TmpID=split("\]",$Tmp[1]); $ID=" ID='".$TmpID[0]."' "; } if ($Value=="default") $Value=""; if ($Width=="default") { $Width=""; } else { $Width=" style='width: $Width;' "; } if ($Class=="default") { $Class=" class='f_text'"; } else { $Class=" class='".$Class."'"; } if ($Aditional=="default") { $Aditional=""; } else { $Aditional=" ".$Aditional; } return "\n"; break; case "textarea" : // Element, Name, Value, Width, Height $Name=$Arg1; $Value=$Arg2; $Width=$Arg3; $Height=$Arg4; if ($Value=="default") $Value=""; if ($Width=="default") { $Width=""; } else { $Width=" style='width: $Width;' "; } if ($Height=="default") { $Height=""; } else { $Height=" Rows='$Height' "; } return "\n"; break; case "password" : // Element, Name, Value, Width, Aditional $Name=$Arg1; $Value=$Arg2; $Width=$Arg3; $Aditional=$Arg4; if (strpos($Name,"[")===FALSE) { $ID=""; } else { $Tmp=split("[",$Name); $TmpID=split("]",$Tmp[1]); $ID=" ID='".$TmpID[0]."' "; } if ($Value=="default") $Value=""; if ($Width=="default") { $Width=""; } else { $Width=" style='width: $Width;' "; } if ($Aditional=="default") { $Aditional=""; } else { $Aditional=" ".$Aditional; } return "\n"; break; case "radio" : // Element, Name, Value, Selected, Aditional $Name=$Arg1; $Value=$Arg2; $Selected=$Arg3; $Aditional=$Arg4; if (strpos($Name,"[")===FALSE) { $ID=""; } else { $Tmp=split("[",$Name); $TmpID=split("]",$Tmp[1]); $ID=" ID='".$TmpID[0]."' "; } if ($Aditional=="default") { $Aditional=""; } else { $Aditional=" ".$Aditional; } if ($Selected=="default") { $Selected=""; } else { $Selected=" checked"; } return ""; break; break; case "checkbox" : // Element, Name, Value, Selected, Aditional $Name=$Arg1; $Value=$Arg2; $Selected=$Arg3; $Aditional=$Arg4; if (strpos($Name,"[")===FALSE) { $ID=""; } else { $Tmp=split("[",$Name); $TmpID=split("]",$Tmp[1]); $ID=" ID='".$TmpID[0]."' "; } if ($Aditional=="default") { $Aditional=""; } else { $Aditional=" ".$Aditional; } if ($Selected=="default") { $Selected=""; } else { $Selected=" checked"; } return ""; break; case "submit" : // Element, Heading, Class $Value=$Arg1; $Class=$Arg2; if ($Class=="default") { $Class="f_text"; } return ""; break; case "button" : // Element, Name, Heading, OnClick $Name=$Arg1; $Value=$Arg2; $OnClick=$Arg3; if ($OnClick=="default") { $OnClick=""; } else { $OnClick=" OnClick='".$OnClick."'"; } return ""; break; case "select" : // Element, Name, Values, Selected, Width, Labels, Aditional $Name=$Arg1; $Values=$Arg2; $Selected=$Arg3; $Width=$Arg4; $Labels=$Arg5; $Aditional=$Arg6; if (!is_array($Values)) $Values=Array("!!!í˙ěŕ âúâĺäĺíč ďŕđŕěĺňđč!!!"); if ($Width=="default") { $Width=""; } else { $Width=" style='width: $Width;' "; } if ($Aditional=="default") { $Aditional=""; } else { $Aditional=" ".$Aditional; } if (strpos($Name,"[")===FALSE) { $ID=""; } else { $Tmp=split("\[",$Name); $TmpID=split("\]",$Tmp[1]); $ID=" ID='".$TmpID[0]."' "; } $ret=""; return $ret; break; case "reset" : // Element, Heading $Value=$Arg1; if ($Value=="default") $Value="Čç÷čńňâŕ"; return ""; break; default : // (ANY) return "
"; break; } // switch } // function Element function bmHeading($Heading,$BR=1) { if ($BR!=0) $ret="   "; $ret.="".$Heading.""; for ($t=0; $t<$BR; $t++) $ret.="
"; return $ret."\n"; } // heading function bmMyQuery($Query) { Global $sql; $Res=mysql_query($Query) or Die (bmError("Error!","
Invalid DataBase Query.","
The query is:
$Query
If the problem persists, contact the system administrator.")); return $Res; } // function MyQuery function bmMyFetch($Query) { Global $sql; $Res=mysql_fetch_array(mysql_query($Query)) or Die (bmError("Error!","
Invalid DataBase Query.","
The query is:
$Query
If the problem persists, contact the system administrator.")); return $Res; } // function MyFetch function bmHackers($Text) { $ret=strip_tags($Text); $ret=escapeshellcmd($ret); $ret=trim($ret); $ret=str_replace("'","`",$ret); return $ret; } function ExpandFolder($FolderID) { Global $PHP_SELF,$expanded_folders; $ret=""; $Temp2=array(); if (isExpandedFolder($FolderID)) { // Expanded $Temp=split(",",$expanded_folders); for ($t=0; $t0) { $first="?xpanded_folders="; } else { unset($ret); $first="?xpanded_folders="; } return ""; } function isExpandedFolder($FolderID) { Global $expanded_folders; if ($expanded_folders=="E_ALL" or $FolderID==0) return TRUE; $Temp=split(",",$expanded_folders); for ($t=0; $t"; } function to_stamp($Date) { $MDate=split("-",$Date); return mktime(12,00,00,$MDate[1],$MDate[2],$MDate[0]); } function Export($Parent=0, &$level, &$RH) { Global $sql; $Folders=bmMyQuery("SELECT * FROM ezine_link_bmcategory WHERE Parent=$Parent ORDER BY CName;"); if (mysql_num_rows($Folders)==0) { // No subFolders return ""; } else { // There are some subFolders while ($Folder=mysql_fetch_array($Folders)) { $level[$Folder["ID"]]=$level[$Parent]+1; For ($t=0; $t<$level[$Folder["ID"]]*2; $t++) $RH.=" "; $RH.="

".$Folder["CName"]."

\n"; $Links=bmMyQuery("SELECT * FROM ezine_link_bmlink WHERE Parent=".$Folder["ID"]." ORDER BY LName;"); For ($t=0; $t<$level[$Folder["ID"]]*2; $t++) $RH.=" "; $RH.="

\n"; while ($Link=mysql_fetch_array($Links)) { For ($t=0; $t<$level[$Folder["ID"]]*2; $t++) $RH.=" "; $RH.="

".$Link["LName"]."\n"; } // while links Export($Folder["ID"],$level, $RH); For ($t=0; $t<$level[$Folder["ID"]]*2; $t++) $RH.=" "; $RH.="

\n"; } // while } // if parent } function ShowFolder($Parent=0, &$level, &$ResultHtml, &$Light) { Global $sql,$Stoitsov,$EasyBookmarker; $Folders=bmMyQuery("SELECT * FROM ezine_link_bmcategory WHERE Parent=$Parent ORDER BY CName;"); if (mysql_num_rows($Folders)==0 or !isExpandedFolder($Parent)) { // No subFolders or Folder is collapsed return ""; } else { // There are some subFolders while ($Folder=mysql_fetch_array($Folders)) { $Light++; if (isset($Stoitsov["User"])) { if ($Light % 2 == 0) { $color="bgcolor=".$EasyBookmarker["Background"].""; } else { $color="bgcolor=".$EasyBookmarker["LightColor1"].""; } } $level[$Folder["ID"]]=$level[$Parent]+1; $ResultHtml.=" ".(isset($Stoitsov["User"]) ? "" : "" )."
".bmTr($level[$Parent]*10). ($level[$Parent]==1 ? ExpandFolder($Folder["ID"])."" : ExpandFolder($Folder["ID"])."")."  ".ExpandFolder($Folder["ID"])."".$Folder["CName"]."".($level[$Parent]==1 ? "
 " : " - " )."".$Folder["CDescription"]."
Edit folderAdd folderAdd link
"; if (isExpandedFolder($Folder["ID"])) { $ResultHtml.=ShowLinks($Folder["ID"],$level[$Parent]*10); } ShowFolder($Folder["ID"],$level, $ResultHtml, &$Light); } // while } // if parent } function ShowBrief($What,$HowMany) { Global $sql, $EasyBookmarker; $Links=bmMyQuery("SELECT * FROM ezine_link_bmlink ORDER BY $What LIMIT 0,".$HowMany.";"); $ResultHtml=""; while ($Link=mysql_fetch_array($Links)) { $ResultHtml.="• ".$Link["LName"]."
"; } return $ResultHtml; } function ShowLinks($Parent=0, $distance) { Global $sql, $Stoitsov,$EasyBookmarker,$OrderQry; $Links=bmMyQuery("SELECT * FROM ezine_link_bmlink WHERE Parent=$Parent ORDER BY $OrderQry;"); $num_links=mysql_num_rows($Links); $i=0; while ($Link=mysql_fetch_array($Links)) { $i++; if (isset($Stoitsov["User"])) { if ($i % 2 != 0) { $color="bgcolor=".$EasyBookmarker["Background"].""; } else { $color="bgcolor=".$EasyBookmarker["LightColor2"]; } } $ret.= " ".(isset($Stoitsov["User"]) ? "" : "" )."
".bmTr($distance).($distance<11 ? bmTr(11)."" : "" )."
".$Link["LName"]." (".$Link["LDescription"].")Edit link Delete link
"; } // while return $ret; } // ******************************************************************** // ************************ Actions // ******************************************************************** if ($action=="login") { if ($bmUsername==$EasyBookmarker["web_user"] && $bmPassword==$EasyBookmarker["web_pass"]) { // valid user $Stoitsov["User"]=$EasyBookmarker["web_user"]; session_register("Stoitsov"); } else { // invalid user $Error="Invalid username or password.
"; $page="login"; }// if } // Login if ($action=="remote") { if ($bmUsername==$EasyBookmarker["web_user"] && $bmPassword==$EasyBookmarker["web_pass"]) { // valid user $Stoitsov["User"]=$EasyBookmarker["web_user"]; session_register("Stoitsov"); $action="add_link"; $bmLUrl=$url; $bmLName=$name; $bmLDescription="Imported from Quick Add function"; $bmParent="0"; } else { // invalid user $Error="Invalid username or password.
"; $page="remote"; }// if } // Remote if ($action=="add_folder") { if (!isset($Stoitsov["User"])) { // invalid user $page="login"; $Error="You need to be a registered user in order to add folders.
"; } else { // valid unset($Error); if (strlen(bmHackers($bmCName))<1) $Error="Folder Name is empty.
"; if (strlen(bmHackers($bmCDescription))<1) $Error.="Folder Description is empty.
"; if (isset($Error)) { // There are errors $page="add_folder"; $parent=$bmParent; } else { // Add Folder bmMyQuery("INSERT INTO ezine_link_bmcategory VALUES(null,'".bmHackers($bmCName)."','".bmHackers($bmCDescription)."','$bmParent');"); } // if Errors } // if valid } // Add Folder if ($action=="edit_folder") { if (!isset($Stoitsov["User"])) { // invalid user $page="login"; $Error="You need to be a registered user in order to edit folders.
"; } else { // valid unset($Error); if (strlen(bmHackers($bmCName))<1) $Error="Folder Name is empty.
"; if (strlen(bmHackers($bmCDescription))<1) $Error.="Folder Description is empty.
"; if (isset($Error)) { // There are errors $page="edit_folder"; $id=$bmID; } else { // Edit Folder bmMyQuery("UPDATE ezine_link_bmcategory SET Parent='".$bmParent."', CName='".bmHackers($bmCName)."', CDescription='".bmHackers($bmCDescription)."' WHERE ID=$bmID;"); } // if Errors } // if valid } // Edit Folder if ($action=="delete_folder") { if (!isset($Stoitsov["User"])) { // invalid user $page="login"; $Error="You need to be a registered user in order to delete folders.
"; } else { // valid bmMyQuery("DELETE FROM ezine_link_bmcategory WHERE ID=$bmID;"); } // if valid } // Delete Folder if ($action=="add_link") { if (!isset($Stoitsov["User"])) { // invalid user $page="login"; $Error="You need to be a registered user in order to add links.
"; } else { // valid unset($Error); if (strlen(bmHackers($bmLUrl))<8) $Error="The link is invalid.
"; if (strlen(bmHackers($bmLName))<1) $Error="Site Name is empty.
"; if (strlen(bmHackers($bmLDescription))<1) $Error.="Site Description is empty.
"; if (isset($Error)) { // There are errors $page="add_link"; $parent=$bmParent; } else { // Add Link bmMyQuery("INSERT INTO ezine_link_bmlink VALUES(null,'".bmHackers($bmLUrl)."','".bmHackers($bmLName)."','".bmHackers($bmLDescription)."','".date("Y-m-d")."','".date("Y-m-d")."','".date("Y-m-d")."',0,'$bmParent');"); } // if Errors } // if valid } // Add Link if ($action=="edit_link") { if (!isset($Stoitsov["User"])) { // invalid user $page="login"; $Error="You need to be a registered user in order to edit links.
"; } else { // valid unset($Error); if (strlen(bmHackers($bmLUrl))<8) $Error="The link is invalid.
"; if (strlen(bmHackers($bmLName))<1) $Error="Site Name is empty.
"; if (strlen(bmHackers($bmLDescription))<1) $Error.="Site Description is empty.
"; if (isset($Error)) { // There are errors $page="add_link"; $parent=$bmParent; $id=$bmID; } else { // Edit Link bmMyQuery("UPDATE ezine_link_bmlink SET Parent='".$bmParent."', LUrl='".bmHackers($bmLUrl)."', LName='".bmHackers($bmLName)."', LDescription='".bmHackers($bmLDescription)."', Modify='".date("Y-m-d")."', Visit='".date("Y-m-d")."' WHERE ID=$bmID;"); } // if Errors } // if valid } // Edit Link if ($action=="delete_link") { if (!isset($Stoitsov["User"])) { // invalid user $page="login"; $Error="You need to be a registered user in order to delete links.
"; } else { // valid bmMyQuery("DELETE FROM ezine_link_bmlink WHERE ID=$bmID;"); } // if valid } // Delete Folder if ($action=="export") { if (!isset($Stoitsov["User"])) { // invalid user $page="login"; $Error="You need to be a registered user in order to export bookmarks.
"; } else { // valid $RH="\n\nBookmarks\n

Bookmarks

\n"; $RH.="

\n"; Export(0,$level,$RH); $Links=bmMyQuery("SELECT * FROM ezine_link_bmlink WHERE Parent=0 ORDER BY LName;"); while ($Link=mysql_fetch_array($Links)) { $RH.="

".$Link["LName"]."\n"; } // while links $RH.="

\n"; header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=bookmark.htm"); print $RH; exit; } // if } // export if ($action=="import") { if (!isset($Stoitsov["User"])) { // invalid user $page="login"; $Error="You need to be a registered user in order to import bookmarks.
"; } else { // valid if ($_FILES['file_name']['type']!="text/html") { // invalid format $page="import"; $Error="You can import only valid HTML/TEXT files.
"; } else { // Valid format, grab $fd = fopen ($_FILES['file_name']['tmp_name'], "r"); $Level=-1; $ParentID=Array(); $ParentID[0]=0; while (!feof ($fd)) { $buffer = trim(fgets($fd, 4096)); $buffer=str_replace(chr(10),"",$buffer); $buffer=str_replace(chr(13),"",$buffer); $buffer=str_replace("

","",$buffer); $buffer=str_replace("'","`",$buffer); if ($buffer=="

") $Level++; if ($buffer=="

") $Level--; if (strlen($buffer)>9 && $Level>=0) { // Valid tag // Determine Type of line if (substr($buffer,1,2)=="H3") { // Its a folder $bmCName=strip_tags($buffer); bmMyQuery("INSERT INTO ezine_link_bmcategory Values(null,'".$bmCName."','Imported folder','".$ParentID[$Level]."');"); $ParentID[$Level+1]=mysql_insert_id(); } elseif (substr($buffer,1,6)=="A HREF") { // Its a link $SplitValues=Array("HREF","ADD_DATE","LAST_VISIT","LAST_MODIFIED","DESCRIPTION","HITS"); $TableValues=Array("bmLUrl","bmDate","bmVisit","bmModify","bmLDescription","bmHits"); for ($t=0; $t Root folder
 ".bmHeading("Spyrosova Linkowňa",0)." ".(isset($Stoitsov["User"]) ? "Add folderAdd link
" : "" ).""; $ResultHtml.=ShowLinks(0,0); $ResultHtml.=$FoldersHtml. ""; } // End: Main Page // Start: Chart page if (isset($page) && $page=="show_links") { $ResultHtml=""; if (!isset($From)) $From=0; $TotalLinks=mysql_num_rows(bmMyQuery("SELECT ID FROM ezine_link_bmlink;")); $Links=bmMyQuery("SELECT * FROM ezine_link_bmlink ORDER BY $ChartQry LIMIT $From,".$EasyBookmarker["links_per_page"].";"); If ($TotalLinks-$From-$EasyBookmarker["links_per_page"]>0) { $More=TRUE; } else { $More=FALSE; } $ResultHtml=bmHeading("Bookmarks",1)."   ".$ChartHeading."

".(isset($Stoitsov["User"]) ? "" : "" )." "; $i=$From; while ($Link=mysql_fetch_array($Links)) { $i++; if ($i % 2 != 0) { $color="bgcolor=".$EasyBookmarker["Background"].""; } else { $color="bgcolor=".$EasyBookmarker["LightColor2"].""; } $ResultHtml.=" ".(isset($Stoitsov["User"]) ? "" : "" ).""; } $ResultHtml.="
#Name/DescriptionAddedModifiedVisitedClicksEditDelete
".$i.". ".$Link["LName"]." (".$Link["LDescription"].") ".$Link["Date"]." ".$Link["Modify"]." ".$Link["Visit"]." ".$Link["Hits"]."Edit link  Delete link

".($From!=0 ? "" : "" )." ".($More ? "" : "" )."
< Previous pageNext page >
"; } // End: Chart Page // Start: Search page if (isset($page) && $page=="search") { $ResultHtml=""; $bmSearch=bmHackers($bmSearch); if (!isset($From)) $From=0; $TotalLinks=mysql_num_rows(bmMyQuery("SELECT ID FROM ezine_link_bmlink WHERE LName like '%".$bmSearch."%' OR LDescription like '%".$bmSearch."%' OR LUrl like '%".$bmSearch."%';")); $Links=bmMyQuery("SELECT * FROM ezine_link_bmlink WHERE LName like '%".$bmSearch."%' OR LDescription like '%".$bmSearch."%' OR LUrl like '%".$bmSearch."%' ORDER BY Hits Desc LIMIT $From,".$EasyBookmarker["links_per_page"].";"); If ($TotalLinks-$From-$EasyBookmarker["links_per_page"]>0) { $More=TRUE; } else { $More=FALSE; } $ResultHtml=bmHeading("Bookmarks",1)."   Search for \"".$bmSearch."\"
".(isset($Stoitsov["User"]) ? "" : "" )." "; $i=$From; while ($Link=mysql_fetch_array($Links)) { $i++; if ($i % 2 != 0) { $color="bgcolor=".$EasyBookmarker["Background"].""; } else { $color="bgcolor=".$EasyBookmarker["LightColor2"].""; } $ResultHtml.=" ".(isset($Stoitsov["User"]) ? "" : "" ).""; } $ResultHtml.="
#Name/DescriptionAddedModifiedVisitedClicksEditDelete
".$i.". ".$Link["LName"]." (".$Link["LDescription"].") ".$Link["Date"]." ".$Link["Modify"]." ".$Link["Visit"]." ".$Link["Hits"]."Edit link  Delete link

".($From!=0 ? "" : "" )." ".($More ? "" : "" )."
< Previous pageNext page >
"; } // End: Search Page // Start: Export page if ($page=="export") { $ResultHtml=""; if (!isset($Stoitsov["User"])) { // invalid user $page="login"; $Error="You need to be registered user in order to add categories."; } else { // valid $ResultHtml.= bmHeading("Export Bookmarks",2); $ResultHtml.= ""; } } // End: Export Page // Start: import page if ($page=="import") { $ResultHtml=""; if (!isset($Stoitsov["User"])) { // invalid user $page="login"; $Error="You need to be registered user in order to add categories."; } else { // valid $ResultHtml.= bmHeading("Import Bookmarks",2). ""; } } // End: Import Page // Start: Add Folder page if (isset($page) && $page=="add_folder" && isset($parent)) { $ResultHtml=""; if (!isset($Stoitsov["User"])) { // invalid user $page="login"; $Error="You need to be a registered user in order to add categories."; } else { // valid if ($parent!=0) { $UnderCategory=bmMyFetch("SELECT * FROM ezine_link_bmcategory WHERE ID=$parent LIMIT 1"); } else { $UnderCategory["CName"]="EasyBookmarker"; } $ResultHtml.=bmHeading("Edit Bookmarks",1). "   New Folder under ".$UnderCategory["CName"]."

".bmElement("form",$PHP_SELF,"Folder","POST")." ".bmElement("hidden","bmParent",$parent).bmElement("hidden","action","add_folder").bmElement()."
 .: New Folder Information
Name: [200 Chars max]
".bmElement("text","bmCName","",250)."
Description: [255 Chars max]
".bmElement("text","bmCDescription","",250)."
".bmElement("submit","Create","f_button")."

". $Error ."
"; } // if valid } // End: Add Folder page // Start: Edit Folder page if (isset($page) && $page=="edit_folder" && isset($id)) { $ResultHtml=""; if (!isset($Stoitsov["User"])) { // invalid user $page="login"; $Error="You need to be registered user in order to edit the folders."; } else { // valid $EditFolder=bmMyFetch("SELECT * FROM ezine_link_bmcategory WHERE ID=$id LIMIT 1"); $isEmpty=mysql_num_rows(bmMyQuery("SELECT * FROM ezine_link_bmlink Where Parent=".$EditFolder["ID"].";"))+ mysql_num_rows(bmMyQuery("SELECT * FROM ezine_link_bmcategory Where Parent=".$EditFolder["ID"].";")); $CatSelects=bmMyQuery("SELECT * FROM ezine_link_bmcategory Where ID<>$id ORDER BY BINARY CName;"); $Under=$Categories[0]="EasyBookmarker"; while ($CatSelect=mysql_fetch_array($CatSelects)) { $Categories[$CatSelect["ID"]]=$CatSelect["CName"]; if ($CatSelect["Parent"]==$EditFolder["ID"]) $Under=$CatSelect["CName"]; } // while $ResultHtml.= bmHeading("Edit Bookmarks",1). "   Edit Folder under ".$Under."

".bmElement("form",$PHP_SELF,"Folder","POST")." ".bmElement("hidden","action","edit_folder"). bmElement("hidden","parent",$EditFolder["Parent"]). bmElement("hidden","bmID",$EditFolder["ID"]).bmElement()."
 .: Folder Information
Move folder under: [no change - no move]
".bmElement("select","bmParent",$Categories,$EditFolder["Parent"],250)."
Name: [200 Chars max]
".bmElement("text","bmCName",$EditFolder["CName"],250)."
Description: [255 Chars max]
".bmElement("text","bmCDescription",$EditFolder["CDescription"],250)."
".bmElement("submit","Change","f_button")."

". $Error. ($isEmpty==0 ? "You may delete this folder. It is empty." : "You can not delete this folder. It is not empty." ) ."
"; } // if valid } // End: Edit Folder page // Start: Add Link page if (isset($page) && $page=="add_link" && isset($parent)) { $ResultHtml=""; if (!isset($Stoitsov["User"])) { // invalid user $page="login"; $Error="You need to be a registered user in order to add links."; } else { // valid if ($parent!=0) { $UnderCategory=bmMyFetch("SELECT * FROM ezine_link_bmcategory WHERE ID=$parent LIMIT 1"); } else { $UnderCategory["CName"]="EasyBookmarker"; } $ResultHtml.= bmHeading("Edit Bookmarks",1). "   New Link under ".$UnderCategory["CName"]."

".bmElement("form",$PHP_SELF,"Link","POST")." ".bmElement("hidden","bmParent",$parent). bmElement("hidden","action","add_link").bmElement()."
 .: New Link Information
Link: [255 Chars max]
".bmElement("text","bmLUrl","http://",250)."
Site Name: [200 Chars max]
".bmElement("text","bmLName","",250)."
Site Description:
".bmElement("text","bmLDescription","",250)."
".bmElement("submit","Add","f_button")."

". $Error ."
"; } // if valid } // End: Add Link page // Start: Edit Link page if (isset($page) && $page=="edit_link" && isset($id) && isset($parent)) { $ResultHtml=""; if (!isset($Stoitsov["User"])) { // invalid user $page="login"; $Error="You need to be a registered user in order to edit the links."; } else { // valid if ($parent!=0) { $UnderCategory=bmMyFetch("SELECT * FROM ezine_link_bmcategory WHERE ID=$parent LIMIT 1"); } else { $UnderCategory["CName"]="EasyBookmarker"; } $EditLink=bmMyFetch("SELECT * FROM ezine_link_bmlink WHERE ID=$id LIMIT 1"); $CatSelects=bmMyQuery("SELECT * FROM ezine_link_bmcategory ORDER BY BINARY CName;"); $Categories[0]="EasyBookmarker"; while ($CatSelect=mysql_fetch_array($CatSelects)) { $Categories[$CatSelect["ID"]]=$CatSelect["CName"]; } // while category $ResultHtml.= bmHeading("Edit Bookmarks",1). "   Edit Link under ".$UnderCategory["CName"]."

".bmElement("form",$PHP_SELF,"Link","POST")." ".bmElement("hidden","action","edit_link"). bmElement("hidden","parent",$parent). bmElement("hidden","bmID",$EditLink["ID"]).bmElement()."
 .: Link Information
Move Link under: [no change - no move]
".bmElement("select","bmParent",$Categories,$parent,250)."
Link: [255 Chars max]
".bmElement("text","bmLUrl",$EditLink["LUrl"],250)."
Site Name: [200 Chars max]
".bmElement("text","bmLName",$EditLink["LName"],250)."
Site Description:
".bmElement("text","bmLDescription",$EditLink["LDescription"],250)."
".bmElement("submit","Change","f_button")."

". $Error. "You may delete this link." ."
"; } // if valid } // End: Edit Link page // Start: Quick Add if (isset($page) && $page=="quick_add") { $ResultHtml=""; $ResultHtml.=bmHeading("Quick Add",1). "   Add your favorite links on the fly.
"; } if (isset($page) && $page=="remote") { $ResultHtml=""; $ResultHtml.=bmHeading("User authorization",1). "   You need to be registered user in order to add bookmarks.

".bmElement("form",$PHP_SELF,"Login","POST")." ".bmElement("hidden","action","remote"). bmElement("hidden","name",urldecode($name)). bmElement("hidden","url",urldecode($url)). bmElement()."
 .: Login
Username: ".bmElement("text","bmUsername",$bmUsername,100)."
Password: ".bmElement("password","bmPassword","",100)."
".bmElement("submit","Login","f_button")."

". $Error ."
"; } // End: Quick_Add // Login page if (isset($page) && $page=="login") { $ResultHtml=""; $ResultHtml.=bmHeading("User authorization",1). "   You need to be registered user in order to add, move, edit or delete bookmarks.

".bmElement("form",$PHP_SELF,"Login","POST")." ".bmElement("hidden","action","login").bmElement()."
 .: Login
Username: ".bmElement("text","bmUsername",$bmUsername,100)."
Password: ".bmElement("password","bmPassword","",100)."
".bmElement("submit","Login","f_button")."

". $Error ."
"; } // ******************************************************************** // ********************** HTML Output // ******************************************************************** // You may edit to suit your site design // but *please* leave the donation button & author names // Start HTML HEADER echo " spyros.nfo.sk \ odkazy "; // CSS Style - Edit to fit your site design echo " "; // Start HTML BODY echo "

| projekty | cestovanie | personal | blog | odkazy |

".bmTr(1,3)."
".bmElement("form",$PHP_SELF,"Search","POST")." ".bmElement("hidden","page","search").bmElement()." ".bmElement()."
 Hľadaj:  ".bmElement("text","bmSearch","",100).bmElement("submit","OK","f_button")."   Užívateľ: ". (!isset($Stoitsov["User"]) ? "Lamer [Login]" : "".$Stoitsov["User"]." [Logout]" ) ." ".(isset($Stoitsov["User"]) ? "  
" : "" )."
 ".(isset($Stoitsov["User"]) ? "Odkazy: Import/Export" : "" )." ".AllFolders("expand")."Otvor všetky ".AllFolders("expand")."Rozvinúť ".AllFolders("collapse")."Zatvor všetky ".AllFolders("collapse")."Zvinúť
Pridaj".bmTr()."
".bmTr(1,3)."
".bmTr(1,1)."

"; // Output current screen if (!isset($page) && !isset($Stoitsov["User"])) { echo "
". $ResultHtml."".bmHeading("Posledne navštívené",2).ShowBrief("Visit",10)."
"; } else { echo $ResultHtml; } // HTML FOOTER START echo "

"; // End HTML Output echo "\n"; /* ****************************************************************** ********************** EasyBookmarker v2.01b ********************* ******************************************** software.stoitsov.com */ ?>