[ "._ADDRESS_BOOK." ] | [ "._A_BADVANCEDSEARCH." ] | [ "._A_BADMIN." ] | "._GOBACK.""; } /*********************************************************/ /* Sections Manager Functions */ /*********************************************************/ function alpha($eid) { global $module_name, $prefix, $dbi; $alphabet = array ("A","B","C","D","E","F","G","H","I","J","K","L","M", "N","O","P","Q","R","S","T","U","V","W","X","Y","Z"); $num = count($alphabet) - 1; echo "
[ "; $counter = 0; while (list(, $ltr) = each($alphabet)) { $result = sql_query("select * from ".$prefix."_address_book_text where eid='$eid' AND UPPER(title) LIKE '$ltr%'", $dbi); if (sql_num_rows($result) > 0) { echo "$ltr"; } else { echo "$ltr"; } if ( $counter == round($num/2) ) { echo " ]\n
\n[ "; } elseif ( $counter != $num ) { echo " | \n"; } $counter++; } echo " ]


\n\n\n"; } function address_book() { global $pNum, $base, $user, $module_name, $prefix, $dbi, $language, $multilingual, $bgcolor2; ## if(!is_user($user)){ include("header.php"); OpenTable(); echo _NIX; CloseTable(); include("footer.php"); ## } else { include("header.php"); title(""._ADDRESS_BOOKMANAGER.""); OpenTable(); echo "" .""; $userinfo = cookiedecode($user); if(!$base) $base=0; $i = $base + 1; $result = sql_query("select image,title,tid,email,celltel,country from ".$prefix."_address_book_text where author='$userinfo[0]' order by title LIMIT $base,$pNum", $dbi); while($a_b = sql_fetch_array($result, $dbi)) { echo ""; } echo ""; $resC = sql_query("select count(tid) from ".$prefix."_address_book_text where author='$userinfo[0]'", $dbi); list($num) = sql_fetch_array($resC, $dbi); if($num > ($base+$pNum)) $next_lnk = ""._NEXT." "; if($base) $prev_lnk = ""._PREVIOUS." "; echo ""; echo "
"._TITLE.""._A_BEMAIL.""._A_BCELL .""._FUNCTIONS."
".$i++."$a_b[title]$a_b[email]$a_b[celltel][ "._EDIT." | "._DELETE." ]
"._A_B_TOTALS.": ".$num."".$prev_lnk."".$next_lnk."
"; CloseTable(); echo "
"; OpenTable(); ShowMenu(); echo "
"._ADDNEWA_BTERM."


" ."
"; echo formLayout(); echo "" ."" ."
"; ShowMenu(); CloseTable(); include("footer.php"); ## } ## } function address_book_terms($eid, $ltr) { global $module_name, $prefix, $dbi; include("header.php"); title(""._ADDRESS_BOOKMANAGER.""); $result = sql_query("select title from ".$prefix."_address_book where eid='$eid' AND UPPER(title) LIKE '%$ltr%'", $dbi); list($title) = sql_fetch_row($result, $dbi); title("$title"); OpenTable(); echo "
"._SELECTONETERM."


" .""; $result = sql_query("select tid, title from ".$prefix."_address_book_text WHERE UPPER(title) LIKE '$ltr%' AND eid='$eid'", $dbi); if (sql_num_rows($result, $dbi) == 0) { echo "
"._NOCONTENTFORLETTER." $ltr.
"; } while(list($tid, $title) = sql_fetch_row($result, $dbi)) { echo ""; } echo "
$title


"; alpha($eid); ShowMenu(); echo "
"._GOBACK."
"; CloseTable(); include("footer.php"); } function address_book_text_edit($tid) { global $module_name, $user, $prefix, $dbi, $language, $multilingual, $bgcolor2; include("header.php"); $userinfo = cookiedecode($user); $result = sql_query("select * from ".$prefix."_address_book_text WHERE tid='$tid' AND author='$userinfo[0]'", $dbi); title(""._ADDRESS_BOOKMANAGER.""); $a_b = sql_fetch_array($result, $dbi); OpenTable(); ShowMenu(); echo "
"._A_BTERMSEDIT."


" ."
"; echo formLayout($a_b); echo "" ."" ."    [ "._DELETE." ]" ."
"; ShowMenu(); CloseTable(); include("footer.php"); } function CreateSelect($arr){ // RB if(!is_array($arr)) return; $arr = array_unique($arr); asort($arr); $string = "