function DisplayError($ErrorMessage = "No Error Message") { global $title, $errcode; $title = ww('ErrorPage'); require_once "header.php"; Menu1("error.php", ww('MainPage')); // Displays the top menu Menu2($_SERVER["PHP_SELF"]); // Display the second menu DisplayHeaderShortUserContent($errcode); // Display the heade echo " <div class=\"info\">"; echo "<p class=\"error\">", $ErrorMessage, "</p>"; echo " </div>"; require_once "footer.php"; exit(0); // To be sure that member doesn't go further after an error }
function refuse_login($message, $nextlink, $Status) { $title = ww('login'); include "layout/header.php"; $title = ww('LoginError'); Menu1("error.php", ww('MainPage')); // Displays the top menu Menu2($_SERVER["PHP_SELF"]); DisplayHeaderShortUserContent(ww("LoginError")); // Display the header echo " <div class=\"info\" style=\"text-align: center\">\n"; echo " <p style=\"color:red;font-size:22px\">", $message, "</p>\n"; echo " <p><a href=\"" . $nextlink . "\" style=\"font-size:22px;\">", ww("GoBack"), "</a></p>\n"; echo " <br />\n"; echo " <p>", ww("IndexPageWord18"); // This is a forgot yout pssword link if ($Status == "MailToConfirm") { echo "</p>\n", ww("ProposeSendAgainMailToConfirm"); } echo " </div>\n"; include "layout/footer.php"; exit(0); }
case "wikilist": $str = "SELECT faq.*, faqcategories.Description AS CategoryName FROM faq, faqcategories WHERE faqcategories.id=faq.IdCategory " . $FilterCategory . $FilterActive . " ORDER BY faqcategories.SortOrder, faq.SortOrder"; $qry = sql_query($str); $TData = array(); while ($rWhile = mysql_fetch_object($qry)) { array_push($TData, $rWhile); } DisplayFaqWiki($TData, $rCat); // call the layout with the selected parameters exit(0); case "update": if (!HasRight("Faq") > 0) { // only people with suficient right can edit FAQ $errcode = "ErrorNeedRight"; // initialise global variable DisplayError(ww($errcode, "Faq")); } if (GetStrParam("QandA") == "") { echo "You must fill the word code associated with the FAQ"; DisplayError("You must fill the word code associated with the FAQ"); exit(0); } $Faq = LoadRow("SELECT * FROM faq WHERE id=" . $IdFaq); $rwq = LoadRow("SELECT * FROM words WHERE code='" . "FaqQ_" . GetStrParam("QandA") . "' and IdLanguage=0"); $rwa = LoadRow("SELECT * FROM words WHERE code='" . "FaqA_" . GetStrParam("QandA") . "' and IdLanguage=0"); if (!isset($rwq->id)) { $str = "INSERT INTO words\n (code,\n Description,\n IdLanguage,\n ShortCode,\n created)\n VALUES\n ('FaqQ_" . GetStrParam("QandA") . "',\n 'This is the questiontext for a Frequently Asked Question.',\n 0,\n '" . $_SESSION['lang'] . "',\n NOW())"; sql_query($str); } if (!isset($rwa->id)) { $str = "INSERT INTO words\n (code,\n Description,\n IdLanguage,\n ShortCode,\n created)\n VALUES\n ('FaqA_" . GetStrParam("QandA") . "',\n 'This is the answertext for a Frequently Asked Question.',\n 0,\n '" . $_SESSION['lang'] . "',\n NOW())";
function DisplayAdminLogs($tData, $username, $type, $ip, $andS1, $andS2, $notAndS1, $notAndS2, $maxpos) { global $title; $rTime = LoadRow("select now() as ss"); $title = "Admin logs Server time: " . $rTime->ss; require_once "header.php"; Menu1("", "Admin Logs page"); // Displays the top menu Menu2("admin/adminlogs.php", ww('MainPage')); // Displays the second menu DisplayHeaderShortUserContent($title); ShowLeftColumn("", VolMenu()); // Show the Actions // middle column echo " <div id=\"col3\"> \n"; echo " <div id=\"col3_content\" class=\"clearfix\"> \n"; echo " <div class=\"info clearfix\">\n"; $max = count($tData); $infoStyles = array(0 => " <tr class=\"blank\" align=\"left\" valign=\"center\">\n", 1 => " <tr class=\"highlight\" align=\"left\" valign=\"center\">\n"); echo " <table cellspacing=\"10\" cellpadding=\"10\" style=\"font-size:11px;\">\n"; echo " <tr>\n"; if (empty($username)) { echo " <th>Username</th>\n"; echo " <th>Type</th>\n"; echo " <th>Str</th>\n"; echo " <th>created</th>\n"; echo " <th>ip</th>\n"; } else { echo " <th colspan=4 align=center> Logs for ", LinkWithUsername(fUsername($username)), "</th>\n"; } echo "</tr>\n"; for ($ii = 0; $ii < $max; $ii++) { $logs = $tData[$ii]; echo $infoStyles[$ii % 2]; // this displays the <tr> if (!empty($logs->Username)) { echo "<td>"; echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?Username="******"\">" . $logs->Username . "</a>"; echo "</td>"; } else { echo "<td>"; // To do according to ip addresses replace with Google, Yahoo .. etc - an external solution is to be find switch (long2ip($logs->IpAddress)) { case "66.249.72.206": echo "Googlebot/2.1"; break; case "74.6.23.107": echo "Yahoo slurp"; break; case "127.0.0.1": echo "<i>localhost</i>"; break; default: echo "<i>not logged</i>"; break; break; } echo "</td>"; } echo "<td>"; echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?Type=" . $logs->Type . "\">" . $logs->Type . "</a>"; // echo $logs->Type; echo "</td>"; echo "<td>"; echo $logs->Str; echo "</td>"; echo "<td>{$logs->created}</td><td> "; echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?ip=" . long2ip($logs->IpAddress) . "\">" . long2ip($logs->IpAddress) . "</a>"; echo " <a href=\"http://ws.arin.net/whois/?queryinput=+" . long2ip($logs->IpAddress) . " \" target=\"new\">arinc</a>"; echo " <a href=\"http://outils-rezo.info/cgi-bin/action.cgi?valeur=" . long2ip($logs->IpAddress) . "&cmd=Whois\" target=\"new\">whois</a>"; echo "</td>"; echo "</tr>\n"; } echo " </table>\n<br>"; if ($max > 0) { echo _Pagination($maxpos); } echo " <hr />\n"; echo " <table>\n"; echo " <form method='post' action='adminlogs.php'>\n"; if (HasRight("Logs") > 1) { echo " <tr>\n"; echo " <td>Username</td><td><input type=\"text\" name=\"Username\" value=\"" . (!empty($username) ? $username : '') . "\"></td>\n"; } else { echo " <tr>\n"; echo " <td>Username</td><td><input type=\"text\" readonly=\"readonly\" name=\"Username\" value=\"" . $username . "\"></td>"; } echo " <td>Type</td><td><input type=text name=Type value=\"" . $type . "\"></td>\n"; echo " <td>Ip</td><td><input type=text name=ip value=\"" . $ip . "\"></td>\n"; echo " </tr>\n"; echo " <tr><td> Having</td><td><input type=text name=andS1 value=\"" . $andS1 . "\"></td></tr>"; echo " <tr><td>and Having</td><td><input type=text name=andS2 value=\"" . $andS2 . "\"></td></tr>"; echo " <tr><td>and not Having</td><td><input type=text name=NotandS1 value=\"" . $notAndS1 . "\"></td></tr>"; echo " <tr><td>and not Having</td><td><input type=text name=NotandS2 value=\"" . $notAndS2 . "\"></td></tr>"; echo " <tr><td colspan=2 align=center>"; echo "<input type=submit id=submit>"; echo "</td>\n"; echo " </tr>\n"; echo " </form>\n"; echo " </table>\n"; echo " </div>\n"; require_once "footer.php"; }
} echo ">\n"; global $_SYSHCVOL; echo "<head>\n"; if (isset($title)) { echo " <title>", $title, "</title>\n"; } else { echo "\n<title>", $_SYSHCVOL['SiteName'], "</title>\n"; } echo " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n"; if (empty($meta_description)) { $meta_description = ww("default_meta_description"); } echo " <meta name=\"description\" content=\"", $meta_description, "\" />\n"; if (empty($meta_keyword)) { $meta_keyword = ww("default_meta_keyword"); } echo " <meta name=\"keywords\" content=\"", $meta_keyword, "\" />\n"; echo " <meta name=\"ROBOTS\" content=\"INDEX, FOLLOW\" />\n"; echo " <link rel=\"shortcut icon\" href=\"" . PVars::getObj("env")->baseuri . "favicon.ico\" />\n"; $stylesheet = "minimal"; // this is the default style sheet // If is logged try to load appropriated style sheet if (IsLoggedIn()) { if (!isset($_SESSION["stylesheet"])) { // cache in session to avoid a reload at each new page $rrstylesheet = LoadRow("select Value from memberspreferences where IdMember=" . $_SESSION['IdMember'] . " and IdPreference=6"); if (isset($rrstylesheet->Value)) { $_SESSION["stylesheet"] = $stylesheet = $rrstylesheet->Value; } }
function DisplayMyResults($_TResult, $_TTitle, $_TTsqry, $rQuery, $Message, $TList) { global $title; if (isset($rQuery->Name)) { // If the query was successfull and if it has a name $title = $rQuery->Name; } else { $title = "FailedQuery"; } require_once "header.php"; Menu1("", ww('MainPage')); // Displays the top menu Menu2("admin/adminquery.php", ww('MainPage')); // Displays the second menu if (HasRight("SqlForVolunteers") >= 10) { $MenuAction = " <li><a href=\"adminquery.php\">admin query</a></li>\n"; } // $MenuAction .= " <li><a href=\"admingroups.php?action=updategroupscounter\">Update group counters</a></li>\n"; DisplayHeaderShortUserContent($title); ShowLeftColumn($MenuAction, VolMenu()); echo " <div id=\"col3\"> \n"; echo " <div id=\"col3_content\" class=\"clearfix\"> \n"; echo " <div class=\"info\">\n"; if (!empty($Message)) { echo "<h2>{$Message}</h2>"; } for ($kk = 0; $kk < count($_TTsqry); $kk++) { $TResult = $_TResult[$kk]; $TTitle = $_TTitle[$kk]; $sqry = $_TTsqry[$kk]; $iCount = count($TTitle); $bgcolor[0] = "#ffffcc"; $bgcolor[1] = "#ffccff"; echo "<p><table>\n"; $max = count($TResult); echo "<tr bgcolor=\"#ff9966\"><th colspan=\"" . $iCount . "\">", $sqry, "</th></tr>"; echo "<tr bgcolor=\"#ff9966\">"; for ($ii = 0; $ii < $iCount; $ii++) { echo "<th>", $TTitle[$ii], "</th>"; } echo "</tr>"; for ($jj = 0; $jj < $max; $jj++) { $rr = $TResult[$jj]; echo "<tr align=left valign=center bgcolor=\"" . $bgcolor[$jj % 2] . "\">"; for ($ii = 0; $ii < $iCount; $ii++) { $FieldName = $TTitle[$ii]; echo "<td>", $rr[$ii], "</td>"; } echo "</tr>"; } echo "</table></p>\n"; } ShowAvailableQueries($TList); echo "</center>"; require_once "footer.php"; }
function DisplayFormCreateBroadcast($IdBroadCast = 0, $Name = "", $BroadCast_Title_, $BroadCast_Body_, $Description, $Type = "") { global $title; $title = "Create a new broadcast"; require_once "header.php"; Menu1("", ww('MainPage')); // Displays the top menu Menu2("admin/adminmassmails.php", ww('MainPage')); // Displays the second menu $MenuAction = " <li><a href=\"adminmassmails.php\">Admin Massmails</a></li>\n"; $MenuAction .= " <li><a href=\"adminmassmails.php?action=createbroadcast\">Create new broadcast</a></li>\n"; if (HasRight("MassMail", "Send")) { // if has right to trig $MenuAction .= " <li><a href=\"adminmassmails.php?action=ShowPendingTrigs\">Trigger mass mails</a></li>\n"; } DisplayHeaderShortUserContent("Admin Mails - Broadcast Messages", ""); ShowLeftColumn($MenuAction, VolMenu()); echo " <div id=\"col3\"> \n"; echo " <div id=\"col3_content\" class=\"clearfix\"> \n"; echo " <div class=\"info clearfix\">\n"; echo "<form method=\"post\" action=\"adminmassmails.php\" class=\"yform full\">\n"; echo "<input type=\"hidden\" name=\"IdBroadCast\" value=\"{$IdBroadCast}\">"; echo "<p class=\"note center\">Please write here in <strong>" . LanguageName($_SESSION['IdLanguage']) . "</strong></p>"; echo "<div class=\"type-text\">"; echo "<p>Give the code name of the broadcast as a word entry (must not exist in words table previously) like <b>NewsJuly2007</b> or <b>NewsAugust2007</b> without spaces!</p>"; echo "<label for=\"Name\">WordCode for the newsletter</label>"; echo "<input type=\"text\" "; if ($Name != "") { echo "readonly"; } // don't change a group name because it is connected to words echo " id=\"Name\" name=\"Name\" value=\"{$Name}\" />"; echo "</div>"; echo "<div class=\"type-text\">"; echo "<label for=\"BroadCast_Title_\">Subject for the newsletter (%username% will be replaced by the username at sending)</label>"; echo "<input type=\"text\" id=\"BroadCast_Title_\" name=\"BroadCast_Title_\" value=\"{$BroadCast_Title_}\" />"; echo "</div>"; echo "<div class=\"type-text\">"; echo "<label for=\"BroadCast_Body_\">Body of the newsletter (%username% will be replaced by the username at sending)</label>"; echo "<textarea id=\"BroadCast_Body_\" name=\"BroadCast_Body_\" rows=\"30\">", $BroadCast_Body_, "</textarea>"; echo "</div>"; echo "<div class=\"type-text\">"; echo "<label for=\"Description\">Description (as translators will see it in AdminWord) </label>"; echo "<textarea id=\"Description\" name=\"Description\" rows=\"8\">", $Description, "</textarea>"; echo "</div>"; echo "<div class=\"type-button\">"; if ($IdBroadCast != 0) { echo "<input type=\"submit\" name=\"submit\" value=\"update massmail\">"; } else { echo "<input type=\"submit\" name=\"submit\" value=\"create massmail\">"; } echo "<input type=\"hidden\" name=\"action\" value=\"createbroadcast\">"; echo "</div>"; echo "</form>"; require_once "footer.php"; }
function DisplayAdminComments($TData, $lastaction = "", $page = 0, $itemsperpage = 0, $count = 0, $urlpiece = "") { global $countmatch; global $title; $title = "Admin Comments"; global $AdminCommentsScope; require_once "header.php"; Menu1("", ww('MainPage')); // Displays the top menu Menu2("admincomments.php", ww('MainPage')); // Displays the second menu $MenuAction = ""; $MenuAction .= " <li><a href=\"" . bwlink("admin/admincomments.php") . "\">Negative comments</a></li>\n"; if (HasRight("Comments", "AdminAbuser")) { $MenuAction .= " <li><a href=\"" . bwlink("admin/admincomments.php?action=AdminAbuser") . "\">Abusive comments</a></li>\n"; } $MenuAction .= " <li><a href=\"" . bwlink("admin/admincomments.php?action=All") . "\">All comments</a></li>\n"; DisplayHeaderShortUserContent($title . ": " . $lastaction); ShowLeftColumn($MenuAction, VolMenu()); echo " <div id=\"col3\"> \n"; echo " <div id=\"col3_content\" class=\"clearfix\"> \n"; echo " <div class=\"info clearfix\">\n"; echo " <h2>Your scope:", $AdminCommentsScope, "</h2>\n"; if ($itemsperpage != 0) { $params = new StdClass(); $params->strategy = new HalfPagePager('right'); if (empty($urlpiece)) { $params->page_url = 'admincomments.php?action=All'; } else { $params->page_url = 'admincomments.php?action=' . $urlpiece; } $params->page_url_marker = 'page'; $params->page_method = 'get'; $params->items = $count; $params->active_page = $page; $params->items_per_page = $itemsperpage; $pager = new PagerWidget($params); $pager->render(); } if (!empty($TData)) { ShowList($TData, $page * $itemsperpage, $count); } if (isset($pager)) { $pager->render(); } require_once "footer.php"; }
if (array_key_exists('switchtrans', $_SESSION) and $_SESSION['switchtrans'] == 'on') { // echo "<a href=\"",$langurl,"switchtrans=off\"><img border=0 height=10 src=\"images/showtransarray.gif\" alt=\"remove translation mode\" width=16></a> "; $pagetotranslate = $_SERVER['PHP_SELF']; if ($pagetotranslate[0] == "/") { $pagetotranslate[0] = "_"; } echo " <a href=\"" . bwlink("admin/adminwords.php?showtransarray=1&pagetotranslate=" . $pagetotranslate) . "\" target=\"_blank\"><img height=\"11px\" width=\"16px\" src=\"" . bwlink("images/switchtrans.gif") . "\" alt=\"go to current translation list for " . $_SERVER['PHP_SELF'] . "\" title=\"go to current translation list for " . $_SERVER['PHP_SELF'] . "\" /></a>\n"; } echo " </div>\n"; echo " <p> </p>\n"; echo "\t<p class=\"center\">"; echo "\t\t<a href=\"../about\">" . ww("AboutUsPage") . "</a>|"; echo " <a href=\"../terms\">" . ww('TermsOfUse') . "</a>|"; echo " <a href=\"../privacy\">" . ww('Privacy') . "</a>|"; echo "\t\t<a href=\"../impressum\">" . ww("Impressum") . "</a>|"; echo "\t\t<a href=\"" . bwlink("faq.php") . "\">" . "faq" . "</a>|"; echo "\t\t<a href=\"" . bwlink("feedback.php") . "\">" . ww("Contact") . "</a>"; echo "\t</p>"; echo " <p class=\"center\">©2007-2008 <strong>BeWelcome</strong> - " . ww("TheHospitalityNetwork") . "</p>\n"; echo " </div> <!-- footer --> \n"; echo " </div> <!-- page --> \n"; echo "</div> <!-- page_margins --> \n"; echo "</body>\n"; echo "</html>\n"; // This will log the delay if a $started_time=time() was issued in config.inc.php and if the delay exceed one second // in config.inc.php it must also be declared as global global $started_time; if (isset($started_time) and $started_time > 0) { $started_time = $started_time - time(); LogStr("Delay for the page according to footer " . $started_time . " second [" . $_SERVER['PHP_SELF'] . "]", "DebugDelay"); }
function DisplayHeaderMainPage($TitleTopContent = "", $MessageBeforeColumnLow = "", $ActionList = "") { global $DisplayHeaderMainPageIsSet; echo " <div id=\"main\">\n"; echo " <div id=\"teaser_bg\">\n"; echo " <div id=\"teaser\" class=\"clearfix teaser_main\">\n"; if (IsLoggedIn()) { echo " <h2>", ww("HelloUsername", LinkWithUsername($_SESSION["Username"])), "</h2>\n"; } else { echo " <h2>", ww("YourAreNotLogged"), "</h2>\n"; } echo " <div id=\"teaser_l\">\n"; echo "\t\t\t\t<img src=\"" . MyPict() . "\" id=\"MainUserpic\" alt=\"ProfilePicture\"/>\n"; echo " </div>\n"; echo " <div id=\"teaser_r\">\n"; echo "\t\t\t<div class=\"subcolumns\">\n"; echo "\t\t\t\t<div class=\"c38l\">\n"; echo " \t\t\t\t<div class=\"subcl\">\n"; echo " \t<p><img src=\"images/icons1616/icon_contactmember.png\" alt=\"Messages\"/>", ww("MainPageNewMessages"), "</p>\n"; echo " \t<p><img src=\"images/icons1616/icon_addcomments.png\" alt=\"Comments\"/>", ww("MainPageNewComments"), "</p>\n"; echo " \t<p><img src=\"images/icons1616/icon_myvisitors.png\" alt=\"Visitors\"/>", ww("MainPageNewVisitors"), "</p>\n"; echo " \t\t\t</div>\n"; echo " \t\t</div>\n"; echo "\t\t\t\t<div class=\"c62r\">\n"; echo "\t\t\t\t\t<div class=\"subcr\">\n"; echo "\t\t\t\t\t\t<div id=\"mapsearch\">\n"; echo "\t\t\t\t\t\t<form>\n"; echo "\t\t\t\t\t <fieldset> \n"; // echo " <label for=\"searchtext\">Search the map</label><br />\n"; echo "\t\t\t\t\t <input type=\"text\" id=\"searchtext\" name=\"searchtext\" size=\"20\" maxlength=\"30\" id=\"text-field\" value=\"Search the map!\" onfocus=\"this.value='';\"/>\n"; echo "\t\t\t\t\t <input type=\"hidden\" name=\"action\" value=\"mapsearch\" />\n"; echo "\t\t\t\t\t <input type=\"image\" src=\"" . bwlink("images/icon_go.png") . "\" id=\"submit-button\" /><br />\n"; echo "\t\t\t\t\t </fieldset>\n"; echo "\t\t\t\t\t\t</form>\n"; echo "\t\t\t\t\t\t</div>\n"; echo "\t\t\t\t\t</div>\n"; echo "\t\t\t\t</div>\n"; echo "\t\t\t</div>\n"; echo " </div>\n"; echo " </div>\n"; // no tabs >> echo "\t <div id=\"middle_nav\" class=\"clearfix\">\n"; echo "\t\t <div id=\"nav_sub\" class=\"notabs\">\n"; echo "\t\t\t <ul>\n"; echo "\t\t\t </ul>\n"; echo "\t\t </div>\n"; echo "\t </div>\n"; echo " </div>\n"; //end teaser_bg ShowLeftColumn($ActionList, VolMenu()); // Show the Actions // middle column echo "\n"; echo " <div id=\"col3\"> \n"; echo " <div id=\"col3_content\" class=\"clearfix\"> \n"; $DisplayHeaderMainPageIsSet = true; // set this for footer function which will be in charge of calling the closing /div }
function DisplayUpdateMandatoryDone($Message) { global $title, $IsVolunteerAtWork; $title = ww('UpdateMandatoryPage'); require_once "header.php"; Menu1($title, ww('UpdateMandatoryPage')); // Displays the top menu Menu2("", ww('UpdateMandatoryPage')); // Displays the second menu DisplayHeaderShortUserContent($title); echo "<br><br><center>", $Message, "</center>\n"; require_once "footer.php"; }
function DisplayEditFaq($Faq, $TCategory) { global $title; $title = ww('FaqPage'); include "header.php"; Menu1("faq.php", ww('FaqPage')); // Displays the top menu Menu2("aboutus.php", ww('GetAnswers')); // Displays the second menu echo "\n"; echo " <div id=\"main\">\n"; echo " <div id=\"teaser_bg\">\n"; echo " <div id=\"teaser\">\n"; echo " <h1>Editing FAQ#", $Faq->id, " (", $Faq->QandA, ") </h1>\n"; echo " </div>\n"; //menugetanswers("faq.php", $title); // Display the generic header echo " </div>\n"; // Content with just two columns echo "\n"; echo " <div id=\"col3\" class=\"twocolumns\">\n"; echo " <div id=\"col3_content\" class=\"clearfix\">\n"; echo "<center>\n<b>Beware</b> edit Faq only apply to english Faq. For other languages, use AdminWords<br/><br/>\n"; echo "<form method=post action=faq.php>\n"; echo "<table width=\"90%\">\n"; echo "<input type=hidden Name=\"IdFaq\" value=", $Faq->id, ">\n"; echo "<input type=hidden Name=action value=update>\n"; echo "<tr><td colspan=2>"; echo "Category "; echo "<select Name=\"IdCategory\">\n"; for ($ii = 0; $ii < count($TCategory); $ii++) { echo "<option value=" . $TCategory[$ii]->id; if ($TCategory[$ii]->id == $Faq->IdCategory) { echo " selected "; } echo ">", ww($TCategory[$ii]->Description), "</option>\n"; } echo "</select>\n"; echo "\nStatus :<select name=\"Status\">\n"; echo "<option value=\"Active\" "; if ($Faq->Active == "Active") { echo " selected "; } echo ">Active</option>\n"; echo "<option value=\"Not Active\" "; if ($Faq->Active == "Not Active") { echo " selected "; } echo ">Not Active</otpion>\n"; echo "</select>\n"; echo "</td>\n"; echo "<tr><td>"; if ($Faq->QandA == "") { echo "You must create a name for this Faq like <i>AbuseCaseWhatToDo</i> -->"; } else { echo "Faq associated root word "; } echo "</td><td><input type=text size=30 name=QandA value=\"", $Faq->QandA, "\">"; echo " SortOrder <input name=SortOrder Value=\"" . $Faq->SortOrder . "\" type=text size=1>"; echo "</td>\n"; echo "<tr><td>Question</td><td>"; echo "<textarea cols=60 rows=1 name=Question>"; if ($Faq->QandA == "") { echo " - to complete - "; } else { echo wwinlang("FaqQ_" . $Faq->QandA, 0); } echo "</textarea></td>\n"; echo "<tr><td>Answer</td><td>"; echo "<textarea cols=60 rows=6 name=Answer>"; if ($Faq->QandA == "") { echo " - to complete - "; } else { echo wwinlang("FaqA_" . $Faq->QandA, 0); } echo "</textarea></td>\n"; echo "<tr><td colspan=2 align=center><input type=submit value=update></td>\n"; echo '<tr><td>What kind of change is this?</td> <td><input type="radio" name="changetype" value="minor" /> Minor change - old translations remain valid<br /> <input type="radio" name="changetype" value="major" /> Major change - old translations are invalidated </td></tr>'; echo "</form>\n"; echo "</table>\n</center>\n"; include "footer.php"; }
function LinkWithPicture($Username, $ParamPhoto = "", $Status = "") { global $_SYSHCVOL; return "<a href='/members/{$Username} title='" . ww("SeeProfileOf", $Username) . "'><img class='framed' " . ($Status == 'map_style' ? "style=\"float: left; margin: 4px\" " : "") . "src='/members/avatar/{$Username}' height=\"50px\" width=\"50px\" alt='Profile'/></a>"; die; // echo "\$Username="******" \$ParamPhoto=",$ParamPhoto ; $Photo = $ParamPhoto; if (empty($Photo) or $Photo == 'NULL') { if (is_numeric($Username)) { $rr = LoadRow("select SQL_CACHE * from members where id=" . $Username); } else { $rr = LoadRow("select SQL_CACHE * from members where Username='******'"); } $Photo = DummyPict($rr->Gender, $rr->HideGender); return "<a href=\"" . bwlink("member.php?cid={$Username}") . "\" title=\"" . ww("SeeProfileOf", $Username) . "\"><img class=\"framed\" " . ($Status == 'map_style' ? "style=\"float: left; margin: 4px\" " : "") . "src=\"" . $Photo . "\" height=\"50px\" width=\"50px\" alt=\"Profile without pict (" . $rr->Gender . ")\" /></a>"; } // TODO: REMOVE THIS HACK: if (strstr($Photo, "memberphotos/")) { $Photo = substr($Photo, strrpos($Photo, "/") + 1); } $orig = $_SYSHCVOL['IMAGEDIR'] . "/" . $Photo; $thumb = getthumb($_SYSHCVOL['IMAGEDIR'] . $Photo, 100, 100); if ($thumb === null) { $thumb = ""; } $thumb = str_replace($_SYSHCVOL['IMAGEDIR'], $_SYSHCVOL['WWWIMAGEDIR'] . '/', $thumb); return "<a href=\"" . bwlink("member.php?cid={$Username}") . "\" title=\"" . ww("SeeProfileOf", $Username) . "\"><img class=\"framed\" " . ($Status == 'map_style' ? "style=\"float: left; margin: 4px\" " : "") . "src=\"" . bwlink($thumb) . "\" height=\"50px\" width=\"50px\" alt=\"Profile\" /></a>"; }
function MemberReadCrypted($IdCrypt) { global $_SYSHCVOL; // use global vars if ($IdCrypt == 0) { return ""; } // if 0 it mean that the field is empty $rr = MyLoadRow("select SQL_CACHE * from " . $_SYSHCVOL['Crypted'] . "cryptedfields where id=" . $IdCrypt); if ($_SESSION["IdMember"] == $rr->IdMember) { // echo $rr->MemberCryptedValue,"<br>"; return GetDeCryptM($rr->MemberCryptedValue); } else { if ($rr->MemberCryptedValue == "") { return ""; } // if empty no need to send crypted return ww("cryptedhidden"); } }