当前位置: 首页>>代码示例>>PHP>>正文


PHP LoadRow函数代码示例

本文整理汇总了PHP中LoadRow函数的典型用法代码示例。如果您正苦于以下问题:PHP LoadRow函数的具体用法?PHP LoadRow怎么用?PHP LoadRow使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了LoadRow函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ReplaceInFTrad

function ReplaceInFTrad($ss, $TableColumn, $IdRecord, $IdTrad = 0, $IdOwner = 0)
{
    if ($IdOwner == 0) {
        $IdMember = $_SESSION['IdMember'];
    } else {
        $IdMember = $IdOwner;
    }
    //  echo "in ReplaceInMTrad \$ss=[".$ss."] \$IdTrad=",$IdTrad," \$IdOwner=",$IdMember,"<br />";
    $IdLanguage = $_SESSION['IdLanguage'];
    if ($IdTrad == 0) {
        return InsertInFTrad($ss, $TableColumn, $IdRecord, $IdMember);
        // Create a full new translation
    }
    $IdTranslator = $_SESSION['IdMember'];
    // the recorded translator will always be the current logged member
    $str = "select * from forum_trads where IdTrad=" . $IdTrad . " and IdLanguage=" . $IdLanguage;
    $rr = LoadRow($str);
    if (!isset($rr->id)) {
        //	  echo "[$str] not found so inserted <br />";
        return InsertInFTrad($ss, $TableColumn, $IdRecord, $IdMember, $IdLanguage, $IdTrad);
        // just insert a new record in memberstrads in this new language
    } else {
        if ($ss != addslashes($rr->Sentence)) {
            // Update only if sentence has changed
            MakeRevision($rr->id, "forum_trads");
            // create revision
            $str = "update forum_trads set TableColumn='" . $TableColumn . "',IdRecord=" . $IdRecord . ",IdTranslator=" . $IdTranslator . ",Sentence='" . $ss . "' where id=" . $rr->id;
            sql_query($str);
        }
    }
    return $IdTrad;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:32,代码来源:dbmaintenance.php

示例2: DisplayAdminLogs

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 . "\">" . $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>&nbsp;";
        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";
//.........这里部分代码省略.........
开发者ID:gpuenteallott,项目名称:rox,代码行数:101,代码来源:adminlogs.php

示例3: ww

    $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;
        }
    }
    $stylesheet = "minimal";
    // force YAML also for logged member (for now, todo several layout)
}
echo '  <link href="/styles/css/' . $stylesheet . '/minimal.css?3" rel="stylesheet" type="text/css" media="screen" />';
echo '<!--[if lte IE 7]>';
echo '  <link href="/styles/css/' . $stylesheet . '/patches/iehacks_3col_vlines.css" rel="stylesheet" type="text/css" media="screen" />';
echo '<![endif]-->';
echo "</head>";
if (isset($onLoadAction)) {
    echo "<body onload='{$onLoadAction}'>";
} else {
开发者ID:gpuenteallott,项目名称:rox,代码行数:31,代码来源:header.php

示例4: DisplayAdminMassprepareenque

function DisplayAdminMassprepareenque($rBroadCast, $TGroupList, $TCountries, $TData, $count = 0, $countnonews = 0, $query = "")
{
    global $title;
    $title = "Admin Mass Mails";
    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());
    $Name = $rBroadCast->Name;
    $IdGroup = GetParam("IdGroup", 0);
    $CountryIsoCode = GetParam("CountryIsoCode", 0);
    echo "    <div id=\"col3\"> \n";
    echo "      <div id=\"col3_content\" class=\"clearfix\"> \n";
    echo "        <div class=\"info clearfix\">\n";
    echo "<h2>For broadcast <b>", $Name, "</b></h2>";
    if ($count > 0) {
        echo "<p class=\"note\"> {$count} enqueued messages !<br /><i>{$countnonews} will not receive the mail because of their preference</i></p>";
    }
    $BroadCast_Title_ = getBroadCastElement("BroadCast_Title_" . $Name, 0);
    $BroadCast_Body_ = getBroadCastElement("BroadCast_Body_" . $Name, 0);
    $rr = LoadRow("select * from words where code='BroadCast_Title_" . $Name . "' and IdLanguage=0");
    if (isset($rr->Description)) {
        $Description = $rr->Description;
    } else {
        $Description = "";
    }
    echo "<h3>", nl2br($BroadCast_Title_), "</h3>";
    echo "<p>", nl2br($BroadCast_Body_), "</p>";
    echo "<br /><form method=\"post\" action=\"adminmassmails.php\" name=\"adminmassmails\" class=\"yform full\">\n";
    echo "<input type=\"hidden\" Name=\"IdBroadCast\" value=" . GetParam("IdBroadCast", 0) . ">\n";
    echo "<h3> Filtering the scope of the mass mail</h3>";
    echo "<div class=\"type-text\">";
    echo "<label for=\"Usernames\">Restrict to some members (ex : lupochen;kiwiflave;jeanyves)</label>";
    echo "<input type=\"text\" id=\"Usernames\" name=\"Usernames\" value=\"" . GetStrParam("Usernames", ""), "\" />\n";
    echo "</div>";
    echo "<div class=\"type-select\">";
    echo "<label for=\"CountryIsoCode\">Choose a country</label>";
    echo "<select id=\"CountryIsoCode\" name=\"CountryIsoCode\">";
    echo "<option value=\"0\">All countries</option>";
    for ($ii = 0; $ii < count($TCountries); $ii++) {
        echo "<option value=\"", $TCountries[$ii]->isoCode . '"';
        if (strcmp($TCountries[$ii]->isoCode, $CountryIsoCode) === 0) {
            echo " selected";
        }
        echo ">", $TCountries[$ii]->Name;
        echo "</option>";
    }
    echo "</select>\n";
    echo "</div>";
    echo "<div class=\"type-select\">";
    echo "<label for=\"IdGroup\">Choose a group</label>";
    echo "<select id=\"IdGroup\" name=\"IdGroup\">";
    echo "<option value=\"0\">All groups</option>";
    for ($ii = 0; $ii < count($TGroupList); $ii++) {
        echo "<option value=", $TGroupList[$ii]->id;
        if ($TGroupList[$ii]->id == $IdGroup) {
            echo " selected";
        }
        echo ">", $TGroupList[$ii]->Name, ":", $TGroupList[$ii]->Name;
        echo "</option>";
    }
    echo "</select>\n";
    echo "</div>";
    echo "<div class=\"type-text\">";
    echo "<label for =\"MemberStatus\">Member with status</label>";
    echo "<input type=\"text\" id=\"MemberStatus\" name=\"MemberStatus\" value=\"" . GetStrParam("MemberStatus", "Active") . "\" />\n";
    echo "</div>";
    echo '<div class="type-text">';
    echo '<label for="Limit">Maximum number of members (i.e. 100)</label>';
    echo '<input type="text" id="limit" name="limit" value="' . GetStrParam("limit", "") . '" />';
    echo '</div>';
    if (GetStrParam("random_order", "") == "on") {
        $random_order_checked = ' checked="checked"';
    } else {
        $random_order_checked = '';
    }
    echo '<div class="type-check">';
    echo '<p>';
    echo '<input type="checkbox"' . $random_order_checked . ' id="random_order" name="random_order" /> ';
    echo '<label for="random_order">Select random members</label>';
    echo '<br>Note: If this option is checked the recipients list below is only an example and does not reflect the list of members the mail will actually be sent to. Members will be randomly selected again when pressing "enqueue".';
    echo '</p>';
    echo '</div>';
    if (HasRight('MassMail', "test")) {
        if (GetStrParam("hide_recipients", "") == "on") {
            $checked = ' checked="checked"';
        } else {
            $checked = '';
        }
        echo '<div class="type-check">';
        echo '<p>';
//.........这里部分代码省略.........
开发者ID:gpuenteallott,项目名称:rox,代码行数:101,代码来源:adminmassmails.php

示例5: and

     $ss = "select rightsvolunteers.*,rights.Name as RightName,members.Username,members.STatus as MemberStatus from rightsvolunteers,rights,members where rights.id=rightsvolunteers.IdRight and rightsvolunteers.Level>=1 and rights.Name='SqlForVolunteers' and (Scope like '%\"" . $IdQuery . "\"%' or Scope like '%\"All\"%') and members.id=rightsvolunteers.IdMember";
     $TResult = array();
     $qry = sql_query($ss);
     while ($rr = mysql_fetch_object($qry)) {
         array_push($TResult, $rr);
     }
     DisplayUsers($rrQuery, $TResult, NULL, $Message);
     break;
 case "execute":
     $IdQuery = (int) GetParam("IdQuery", 0);
     $rrQuery = LoadRow("select * from sqlforvolunteers where id=" . $IdQuery);
     if (!isset($rrQuery->id)) {
         DisplayMyResults(array(), array(), array(), $rrQuery, "Sorry your query has failed #IdQuery=<b>" . $IdQuery . "</b>", $TList);
         break;
     }
     $IsQueryAllowedInGroup = LoadRow("select count(*) as cnt  from sqlforgroupsmembers where IdGroup in (" . $membergrouplist . ") and IdQuery=" . $IdQuery);
     if (!HasRight('SqlForVolunteers', '"' . $IdQuery . '"') and $IsQueryAllowedInGroup->cnt == 0) {
         DisplayMyResults(array(), array(), array(), $rrQuery, "Sorry you miss right scope for query <b>" . $rrQuery->Name . "</b>", $TList);
         LogStr("Trying to use a not allowed query (" . $rrQuery->Name . ")", "adminquery");
         break;
     }
     $_TResult = array();
     $_TTitle = array();
     $_TTsqry = array();
     $_rrQuery = array();
     $tQuery = explode(";", $rrQuery->Query);
     for ($jj = 0; $jj < count($tQuery); $jj++) {
         $sQry = ltrim($tQuery[$jj]);
         if (empty($sQry)) {
             continue;
         }
开发者ID:gpuenteallott,项目名称:rox,代码行数:31,代码来源:adminquery.php

示例6: ComputeSpamCheck

function ComputeSpamCheck($IdMess)
{
    $Mes = LoadRow("select * from messages where id=" . $IdMess);
    if (isset($Mes->id)) {
        $CheckerComment = $Mes->CheckerComment;
        // Case NeverCheckSendMail
        if (HasFlag("NeverCheckSendMail", "", $Mes->IdSender)) {
            $Status = 'ToSend';
            $SpamInfo = "NotSpam";
            $CheckerComment .= "Sent by member with NeverCheckSendMail \n";
            $str = "update messages set Status='" . $Status . "',CheckerComment='" . $CheckerComment . "',SpamInfo='" . $SpamInfo . "' where id=" . $Mes->id . " and Status!='Sent'";
            sql_query($str);
            LogStr("NeverCheckSendMail for message #" . $IdMess . " from <b>" . fUsername($Mes->IdSender) . "</b> to <b>" . fUsername($Mes->IdReceiver) . "</b>", "AutoSpamCheck");
            return $Status;
        }
        // Test what the Spam mark should be
        $SpamInfo = "NotSpam";
        // By default its not a Spam
        $tt = explode(";", wwinlang("MessageBlackWord", 0));
        $max = count($tt);
        for ($ii = 0; $ii < $max; $ii++) {
            if (strstr($Mes->Message, $tt[$ii]) != "" and $tt[$ii] != "") {
                $SpamInfo = "SpamBlkWord";
                $CheckerComment .= "Has BlackWord <b>" . $tt[$ii] . "</b>\n";
            }
        }
        $tt = explode(";", wwinlang("MessageBlackWord", GetDefaultLanguage($Mes->IdSender)));
        $max = count($tt);
        for ($ii = 0; $ii < $max; $ii++) {
            if (strstr($Mes->Message, $tt[$ii]) != "" and $tt[$ii] != "") {
                $SpamInfo = "SpamBlkWord";
                $CheckerComment .= "Has BlackWord (in sender language)<b>" . $tt[$ii] . "</b>\n";
            }
        }
        // End of Test what the Spam mark should be
        // Case AlwayCheckSendMail
        if (HasFlag("AlwayCheckSendMail", "", $Mes->IdSender)) {
            $Status = 'ToCheck';
            $CheckerComment .= "Sent by member with AlwayCheckSendMail \n";
            $str = "update messages set Status='" . $Status . "',CheckerComment='" . $CheckerComment . "',SpamInfo='" . $SpamInfo . "' where id=" . $Mes->id . " and Status!='Sent'";
            sql_query($str);
            LogStr("AlwayCheckSendMail for message #" . $IdMess . " from <b>" . fUsername($Mes->IdSender) . "</b> to <b>" . fUsername($Mes->IdReceiver) . "</b>", "AutoSpamCheck");
            return $Status;
        }
        // Case if receiver has preference PreferenceCheckMyMail set to "Yes"  : mail is always set to toCheck
        $rPrefCheckMyMail = LoadRow("select *  from memberspreferences where IdMember=" . $Mes->IdReceiver . " and IdPreference=4");
        // PreferenceCheckMyMail --> IdPref=4
        if (isset($rPrefCheckMyMail->Value) and $rPrefCheckMyMail->Value == 'Yes') {
            // if member has choosen CheckMyMail
            $Status = 'ToCheck';
            $CheckerComment .= "Member has asked for checking\n";
            $str = "update messages set Status='" . $Status . "',CheckerComment='" . $CheckerComment . "',SpamInfo='" . $SpamInfo . "' where id=" . $Mes->id . " and Status!='Sent'";
            sql_query($str);
            LogStr("PreferenceCheckMyMail for message #" . $IdMess . " from <b>" . fUsername($Mes->IdSender) . "</b> to <b>" . fUsername($Mes->IdReceiver) . "</b>", "AutoSpamCheck");
            return $Status;
        }
        // Default case
        $Status = 'ToSend';
        $str = "update messages set Status='" . $Status . "',CheckerComment='" . $CheckerComment . "',SpamInfo='" . $SpamInfo . "' where id=" . $Mes->id . " and Status!='Sent'";
        sql_query($str);
        return $Status;
    }
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:63,代码来源:FunctionsMessages.php

示例7: RightScope

}
// If there is a Scope limit logs to the type in this Scope (unless it his own logs)
if (!HasRight('Logs', "\"All\"")) {
    $scope = RightScope("Logs");
    str_replace($scope, "\"", "'");
    $where .= " AND (Type IN (" . $scope . ") OR IdMember=" . $_SESSION["IdMember"] . ") ";
}
switch (GetParam("action")) {
    case "del":
        // case a delete is requested
        break;
}
$tData = array();
if (empty($where) and $start_rec == 0) {
    // In this case we will avoid the FOUND_ROW which is a performance killer
    $str = "SELECT logs.*,Username " . "FROM " . $_SYSHCVOL['ARCH_DB'] . ".logs LEFT JOIN members ON members.id=logs.IdMember " . "ORDER BY " . $_SYSHCVOL['ARCH_DB'] . ".logs.id DESC LIMIT {$start_rec}," . $limitcount;
    $qry = sql_query($str);
    $rCount = LoadRow("SELECT count(*)  AS cnt from " . $_SYSHCVOL['ARCH_DB'] . ".logs");
} else {
    $str = "SELECT SQL_CALC_FOUND_ROWS logs.*,Username " . "FROM " . $_SYSHCVOL['ARCH_DB'] . ".logs LEFT JOIN members ON members.id=logs.IdMember " . "WHERE 1=1 " . $where . " " . "ORDER BY " . $_SYSHCVOL['ARCH_DB'] . ".logs.id DESC LIMIT {$start_rec}," . $limitcount;
    $qry = sql_query($str);
    $rCount = LoadRow("SELECT FOUND_ROWS() AS cnt");
}
while ($rr = mysql_fetch_object($qry)) {
    array_push($tData, $rr);
}
if ($username != "0") {
    // Usage of adminlog is logged
    LogStr("Is using adminlog on profile <b>" . $username . "</b>", "adminlog");
}
DisplayAdminLogs($tData, $username, $type, $ip, $andS1, $andS2, $notAndS1, $notAndS2, $rCount->cnt);
开发者ID:gpuenteallott,项目名称:rox,代码行数:31,代码来源:adminlogs.php

示例8: MyLoadRow

function MyLoadRow($ss)
{
    if (function_exists("LoadRow")) {
        return LoadRow($ss);
    } else {
        $qq = mysql_query($ss);
        if (!$qq) {
            error_log("failed in MyLoadRow(" . $ss . ")");
            die("failure in MyLoadRow");
        }
        return mysql_fetch_object($qq);
    }
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:13,代码来源:FunctionsCrypt.php

示例9: GetParam

    // admin can alter other profiles
    $IdMember = GetParam("cid", $_SESSION['IdMember']);
}
$m = prepareProfileHeader($IdMember, "", 0);
// This is the profile of the contact which is going to be used
switch (GetParam("action")) {
    case "del":
        $str = "delete from intermembertranslations where IdTranslator=" . GetParam("IdTranslator") . " and IdMember=" . $IdMember;
        sql_query($str);
        LogStr("Removing translator <b>" . fUserName(GetParam("IdTranslator")) . "</b>", "mytranslators");
        break;
    case "add":
        // todo
        $IdTranslator = IdMember(GetParam("Username"), 0);
        $IdLanguage = Getparam("IdLanguage");
        $rr = LoadRow("select id from intermembertranslations where IdTranslator=" . $IdTranslator . " and IdMember=" . $IdMember . " and IdLanguage=" . $IdLanguage);
        if (!isset($rr->id) and $IdTranslator != 0) {
            // if not allready exists
            $str = "insert into intermembertranslations(IdTranslator,IdMember,IdLanguage) values(" . $IdTranslator . "," . $IdMember . "," . $IdLanguage . ")";
            sql_query($str);
            LogStr("Adding translator <b>" . fUserName(GetParam("IdTranslator")) . "</b> for language", "mytranslators");
        }
        break;
}
$TData = array();
$str = "select intermembertranslations.*,members.Username,members.ProfileSummary,cities.Name as cityname,regions.Name as regionname,countries.Name as countryname,membersphotos.FilePath as photo,membersphotos.Comment";
$str .= " from intermembertranslations,cities,countries,regions,recentvisits,members left join membersphotos on membersphotos.IdMember=members.id and membersphotos.SortOrder=0 where cities.IdRegion=regions.id and countries.id=cities.IdCountry and cities.id=members.IdCity and status='Active' and members.id=intermembertranslations.IdTranslator and intermembertranslations.IdMember=" . $IdMember . " and members.status='Active' GROUP BY members.id order by intermembertranslations.updated desc";
$qry = sql_query($str);
while ($rr = mysql_fetch_object($qry)) {
    if ($rr->ProfileSummary > 0) {
        $rr->ProfileSummary = FindTrad($rr->ProfileSummary);
开发者ID:gpuenteallott,项目名称:rox,代码行数:31,代码来源:mytranslators.php

示例10: DisplayFaq

function DisplayFaq($TFaq)
{
    global $title;
    $IdFaq = GetParam("IdFaq", 0);
    $argv = $_SERVER["argv"];
    if (isset($argv[1])) {
        $IdFaq = $argv[1];
    }
    if ($IdFaq == 0) {
        $title = ww('FaqPage');
    } elseif ($TFaq[0]->PageTitle != "") {
        $title = ww($TFaq[0]->PageTitle);
    } else {
        $title = ww("FaqQ_" . $TFaq[0]->QandA);
    }
    include "header.php";
    Menu1("faq.php", ww('FaqPage'));
    // Displays the top menu
    Menu2("faq.php", ww('GetAnswers'));
    echo "\n";
    echo "    <div id=\"main\">\n";
    echo "      <div id=\"teaser_bg\">\n";
    echo "      <div id=\"teaser\">\n";
    echo "        <h1>", $title, " </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";
    $iiMax = count($TFaq);
    $LastCat = "";
    // Display the list of the questions
    echo "<div class=\"info\">\n";
    for ($ii = 0; $ii < $iiMax; $ii++) {
        if ($LastCat != $TFaq[$ii]->CategoryName) {
            $LastCat = $TFaq[$ii]->CategoryName;
            if (HasRight("Faq") > 0) {
                echo "[<a href=\"faq.php?action=insert&IdCategory=", $TFaq[$ii]->IdCategory, "\">insert new faq in this category</a>]\n";
            }
            if ($IdFaq == 0) {
                if ($ii > 0) {
                    echo "</ul><br/>\n";
                }
                echo " <h3>", ww($TFaq[$ii]->CategoryName), "</h3>\n<ul>\n";
            }
        }
        $Q = ww("FaqQ_" . $TFaq[$ii]->QandA);
        if ($IdFaq == 0) {
            echo "<li>";
        }
        if ($TFaq[$ii]->QandA == "") {
            $Q = " new ";
        }
        if (HasRight("Faq") > 0) {
            if ($TFaq[$ii]->QandA == "") {
                echo " [<a href=\"faq.php?action=edit&IdFaq=", $TFaq[$ii]->id, "\">edit this new faq</a>]\n";
            } else {
                echo " [<a href=\"faq.php?action=edit&IdFaq=", $TFaq[$ii]->id, "\">edit</a>]\n";
            }
        }
        //		echo " <a href=\"" . $_SERVER["PHP_SELF"] . "?IdFaq=", $TFaq[$ii]->id, "\">", $Q, "</a>";
        if ($IdFaq == 0) {
            if (IsLoggedIn()) {
                echo " <a href=\"faq.php?IdFaq=" . $TFaq[$ii]->id . "\">", $Q, "</a></li>\n";
            } else {
                // If not login provide links to specific files
                $ss = "select code from words where code=\"FaqA_" . $TFaq[$ii]->QandA . "\" and IdLanguage=" . $_SESSION["IdLanguage"];
                //					echo $ss ;
                $rFak = LoadRow($ss);
                if (empty($rFak->code)) {
                    echo " <a href=\"faq_" . $TFaq[$ii]->QandA . "_en.php\">", $Q, "</a></li>\n";
                    // Force english if the text is not yet translated to avoid several page with the same english default text
                } else {
                    echo " <a href=\"faq_" . $TFaq[$ii]->QandA . "_" . $_SESSION["lang"] . ".php\">", $Q, "</a></li>\n";
                }
            }
        }
    }
    // end of for $ii
    if ($IdFaq == 0) {
        echo "</ul><br/>\n";
    }
    // Display the list of the answers
    for ($ii = 0; $ii < $iiMax and (IsLoggedIn() or $IdFaq != 0); $ii++) {
        //    echo "					<div class=\"clear\" />\n";
        if ($IdFaq == 0) {
            echo " <h3>", ww($TFaq[$ii]->CategoryName), "</h3>";
        }
        $Q = ww("FaqQ_" . $TFaq[$ii]->QandA);
        $A = ww("FaqA_" . $TFaq[$ii]->QandA);
        if ($IdFaq == 0) {
            echo "<h4><a name=\"", $TFaq[$ii]->id, "\"></a> ", $Q, "</h4>\n";
        }
        echo "<p>", str_replace("\n", "", $A), "</p>\n";
    }
    if (IsAdmin()) {
        echo "<br/><p><a href=\"faq.php?action=rebuildextraphpfiles\">rebuild extra php files</a></p>";
    }
//.........这里部分代码省略.........
开发者ID:gpuenteallott,项目名称:rox,代码行数:101,代码来源:faq.php

示例11: getBroadCastElement

function getBroadCastElement($wordCode, $languageId, $username = false, $email = false)
{
    $sentence = "";
    $rr = LoadRow("select SQL_CACHE Sentence,donottranslate from words where code='{$wordCode}' and IdLanguage='" . $languageId . "'");
    if (isset($rr->Sentence)) {
        $sentence = stripslashes($rr->Sentence);
    }
    if ($sentence == "") {
        $rEnglish = LoadRow("select SQL_CACHE Sentence,donottranslate from words where code='{$wordCode}' and IdLanguage=0");
        if (!isset($rEnglish->Sentence)) {
            $sentence = $wordCode;
            // The code of the word will be return
        } else {
            $sentence = stripslashes($rEnglish->Sentence);
        }
    }
    if ($username) {
        // we prepare to send or display the send mail therefore change nls to <br>
        $sentence = nl2br($sentence);
        // backwards compatibility replace %s with username and %% with % (just in case someone
        // wants to send an old newsletter again
        $sentence = str_replace('%s', $username, $sentence);
        $sentence = str_replace('%%', '%', $sentence);
        // replace %username% with real username. allow some different writings.
        $sentence = str_replace('%UserName%', $username, $sentence);
        $sentence = str_replace('%username%', $username, $sentence);
        $sentence = str_replace('%Username%', $username, $sentence);
    }
    if ($email) {
        $sentence = str_replace('%emailaddress%', $email, $sentence);
        $sentence = str_replace('%Emailaddress%', $email, $sentence);
        $sentence = str_replace('%EmailAddress%', $email, $sentence);
    }
    return $sentence;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:35,代码来源:lang.php

示例12: Getparam

 case "AdminCommentMustCheck":
     $Message = "Set comment to be checked by Admin Comment";
     $str = "Update comments set AdminAction='AdminCommentMustCheck' where id=" . Getparam("IdComment");
     sql_query($str);
     LogStr(" Setting to <b>tobe check by Admin Comment</b> for IdComment #" . Getparam("IdComment"), "AdminComment");
     break;
 case "del":
     if (!HasRight("Comments", "DeleteComment")) {
         $Message = "You don't have the right to delete comments";
         // call the layout
         DisplayAdminComments(loaddata("", " and comments.id=" . GetParam("IdComment")), $Message);
         exit(0);
         break;
     }
     $Message = " Delete comment #" . GetParam("IdComment");
     $c = LoadRow("select * from comments where id=" . GetParam("IdComment"));
     if (!isset($c->id)) {
         $Message = "No such coment";
         // call the layout
         DisplayAdminComments(loaddata("", " and comments.id=" . GetParam("IdComment")), $Message);
         exit(0);
         break;
     }
     $str = "delete from comments  where id=" . GetParam("IdComment");
     sql_query($str);
     LogStr("Deleting comment #" . GetParam("IdComment") . " previous where=" . $c->TextWhere . " previous text=" . $c->TextFree . " previous Quality=" . $c->Quality, "AdminComment");
     // call the layout
     DisplayAdminComments(loaddata("", " and comments.IdToMember=" . $c->IdToMember), $Message);
     exit(0);
     break;
 case "Checked":
开发者ID:gpuenteallott,项目名称:rox,代码行数:31,代码来源:admincomments.php

示例13: BuildVolMenu

function BuildVolMenu()
{
    $res = array();
    if (HasRight("Grep")) {
        array_push($res, new CVolMenu("admin/admingrep.php", "AdminGrep", "Grepping files"));
    }
    if (HasRight("Group")) {
        array_push($res, new CVolMenu("admin/admingroups.php", "AdminGroup", "Group managment"));
    }
    if (HasRight("Flags")) {
        array_push($res, new CVolMenu("admin/adminflags.php", "AdminFlags", "administration of members flags"));
    }
    if (HasRight("Rights")) {
        array_push($res, new CVolMenu("/admin/rights", "AdminRights", "administration of members rights"));
    }
    if (HasRight("Logs")) {
        array_push($res, new CVolMenu("admin/adminlogs.php", "AdminLogs", "logs of activity"));
    }
    if (HasRight("Comments")) {
        array_push($res, new CVolMenu("admin/admincomments.php", "AdminComments", "managing comments"));
    }
    if (HasRight("Pannel")) {
        array_push($res, new CVolMenu("admin/adminpanel.php", "AdminPanel", "managing panel (may be obsolete)"));
    }
    if (HasRight("Checker")) {
        $rr = LoadRow("SELECT COUNT(*) AS cnt FROM messages WHERE Status='ToCheck' AND messages.WhenFirstRead='0000-00-00 00:00:00'");
        $rrSpam = LoadRow("SELECT COUNT(*) AS cnt FROM messages,members AS mSender, members AS mReceiver WHERE mSender.id=IdSender AND messages.SpamInfo='SpamSayMember' AND mReceiver.id=IdReceiver AND (mSender.Status='Active' or mSender.Status='Pending')");
        $text = "AdminChecker" . "(" . $rr->cnt . "/" . $rrSpam->cnt . ")";
        array_push($res, new CVolMenu("admin/adminchecker.php", $text, "Mail Checking"));
    }
    if (HasRight("Debug", "ShowErrorLog")) {
        array_push($res, new CVolMenu("admin/phplog.php?showerror=10", "php error log", "php error log"));
    }
    if (HasRight("Debug", "ShowSlowQuery")) {
        array_push($res, new CVolMenu("admin/phplog.php?ShowSlowQuery=10", "Slow queries", "Mysql Slow queries"));
    }
    if (HasRight("MassMail")) {
        array_push($res, new CVolMenu("admin/adminmassmails.php", "mass mails", "Broadcast messages"));
    }
    return $res;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:41,代码来源:FunctionsTools.php

示例14: CanTranslate

function CanTranslate($IdMember)
{
    if (empty($_SESSION["IdMember"])) {
        return false;
    }
    $IdTranslator = $_SESSION["IdMember"];
    $IdLanguage = $_SESSION["IdLanguage"];
    $rr = LoadRow("select SQL_CACHE id from intermembertranslations where IdMember=" . $IdMember . " and IdTranslator=" . $IdTranslator . " and IdLanguage=" . $IdLanguage);
    if (!isset($rr->id)) {
        return false;
    } else {
        return $rr->id;
    }
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:14,代码来源:rights.php

示例15: exit

            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())";
            sql_query($str);
        }
        // reload for case it was just inserted before
        $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 (GetStrParam('changetype') == 'major') {
            $majorupdate = ',majorupdate = NOW() ';
        } else {
            $majorupdate = '';
        }
        $str = "UPDATE words SET Description='" . addslashes($rwq->Description) . "',Sentence='" . GetStrParam("Question") . "' {$majorupdate} WHERE id=" . $rwq->id;
        sql_query($str);
        $str = "UPDATE words SET Description='" . addslashes($rwa->Description) . "',Sentence='" . GetStrParam("Answer") . "' {$majorupdate} WHERE id=" . $rwa->id;
        sql_query($str);
        $str = "UPDATE faq SET IdCategory=" . GetParam("IdCategory") . ",QandA='" . GetParam("QandA") . "',Active='" . GetStrParam("Status") . "',SortOrder=" . GetParam("SortOrder") . " WHERE id=" . $Faq->id;
        sql_query($str);
        LogStr("updating Faq #" . $Faq->id, "Update Faq");
        break;
}
// prepare the list
开发者ID:gpuenteallott,项目名称:rox,代码行数:31,代码来源:faq.php


注:本文中的LoadRow函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。