function show_textarea($name, $text)
{
    rowify("<textarea name=\"{$name}\" cols=80 rows=20>" . $text . "</textarea>");
}
    echo uotd_thumbnail($profile, $user);
    echo user_links($user) . "<br>";
    $resp = output_transform($profile->response1);
    $resp = sanitize_tags($resp);
    echo sub_sentence($resp, ' ', 150, true);
}
echo "</td></tr>";
row1(tra("User Profile Explorer"));
echo "<tr><td>\n    <ul>\n    <li>" . tra("View the %1User Picture Gallery%2.", "<a href=\"" . URL_BASE . "user_profile/user_gallery_1.html\">", "</a>") . "</li>\n    <li>" . tra("Browse profiles %1by country%2.", "<a href=\"" . URL_BASE . "user_profile/profile_country.html\">", "</a>") . "</li>\n    <li>" . tra("Browse profiles %1at random%2, %3at random with pictures%2, or %4at random without pictures%2.", "<a href=\"?cmd=rand&amp;pic=-1\">", "</a>", "<a href=\"?cmd=rand&amp;pic=1\">", "<a href=\"?cmd=rand&amp;pic=0\">") . "</li>\n";
if (file_exists(PROFILE_PATH . "profile_alpha.html")) {
    echo "<li>" . tra("Alphabetical profile listings:") . "<br>";
    include PROFILE_PATH . "profile_alpha.html";
}
echo "</ul></td></tr>";
row1(tra("Search profile text"));
rowify("\n    <form action=\"profile_search_action.php\" method=\"GET\">\n    <input type=\"text\" name=\"search_string\">\n    <input type=\"submit\" value=\"" . tra("Search") . "\">\n    </form>\n");
end_table();
page_tail();
function select_profile($cmd)
{
    // Request for a random profile.
    //
    if ($cmd == "rand") {
        $profiles = array();
        $pic = get_int('pic');
        if ($pic == 0) {
            $profiles = BoincProfile::enum("has_picture=0", "limit 1000");
        } else {
            if ($pic == 1) {
                $profiles = BoincProfile::enum("has_picture=1", "limit 1000");
            } else {
Exemple #3
0
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
require_once "../inc/util.inc";
require_once "../inc/boinc_db.inc";
if (DISABLE_PROFILES) {
    error_page("Profiles are disabled");
}
check_get_args(array("userid", "vote"));
$userid = get_int('userid');
$vote = get_str('vote');
$logged_in_user = get_logged_in_user();
if ($vote != "recommend" && $vote != "reject") {
    error_page(tra("Invalid vote type:") . " " . htmlentities($vote));
}
BoincProfile::update_aux("{$vote}={$vote}+1 WHERE userid = {$userid}");
page_head(tra("Vote Recorded"));
start_table_noborder();
row1(tra("Thank you"));
if ($vote == "recommend") {
    rowify(tra("Your recommendation has been recorded."));
} else {
    rowify(tra("Your vote to reject this profile has been recorded."));
}
end_table();
echo "<br><a href=\"view_profile.php?userid=", $userid, "\">" . tra("Return to profile.") . "</a>";
page_tail();