Пример #1
0
    */
    people_header(array('title' => _('View a User Profile')));
    //for security, include group_id
    $sql = "SELECT * FROM users WHERE user_id='{$user_id}'";
    $result = db_query($sql);
    if (!$result || db_numrows($result) < 1) {
        echo db_error();
        $feedback .= _('User fetch FAILED');
        echo '<h2>' . _('No Such User') . '</h2>';
    } else {
        /*
        	profile set private
        */
        if (db_result($result, 0, 'people_view_skills') != 1) {
            echo '<h2>' . _('This User Has Set His/Her Profile to Private') . '</h2>';
            people_footer(array());
            exit;
        }
        echo '
        <p>
		<strong>' . _('Skills profile for') . ' : </strong>' . db_result($result, 0, 'realname') . ' (' . db_result($result, 0, 'user_name') . ')<br /><br /></p> <table border="0" width="100%">';
        displayUserSkills($user_id, 0);
        echo '</table>';
    }
    people_footer(array());
} else {
    /*
    	Not logged in or insufficient privileges
    */
    exit_error('Error', 'user_id not found.');
}
Пример #2
0
        $cell_data[] = array(_('Start Date'));
        $cell_data[] = array(_('End Date'));
        echo "<table border=0 >" . $HTML->multiTableRow('', $cell_data, TRUE);
        echo "<tr>" . "<td>" . html_build_select_box($skills, "type", 1, false, "") . "</td>" . "<td>" . html_build_select_box_from_arrays($monthArrayVals, $monthArray, "startM", date("m"), false, "") . html_build_select_box_from_arrays($yearArray, $yearArray, "startY", 0, false, "") . "</td>" . "<td>" . html_build_select_box_from_arrays($monthArrayVals, $monthArray, "endM", date("m"), false, "") . html_build_select_box_from_arrays($yearArray, $yearArray, "endY", 0, false, "") . "</td>" . "</tr>" . "</table>" . "<table border=0 >";
        $cell_data = array();
        $cell_data[] = array(_('Title (max 100 characters)'));
        echo $HTML->multiTableRow('', $cell_data, TRUE);
        echo "<tr>" . "<td><input type=text name=\"title\" size=100></td>" . "</tr>";
        $cell_data = array();
        $cell_data[] = array(_('Keywords (max 255 characters)'));
        echo $HTML->multiTableRow('', $cell_data, TRUE);
        echo "<tr>" . "<td><textarea name=\"keywords\" rows=\"3\" cols=\"85\" wrap=\"soft\"></textarea></td>" . "</tr>" . "<tr>" . "<td><input type=submit name=\"AddSkill\" value=\"" . _('Add This Skill') . "\"></td>" . "</tr>" . "</table>";
        echo '</form>';
        echo '<h2>' . _('Edit/Delete Your Skills') . '</h2>
		<table border="0" width="100%">';
        echo '<form action="' . getStringFromServer('PHP_SELF') . '" METHOD="POST">';
        displayUserSkills(user_getid(), 1);
        echo '</form>';
        echo '</table>';
    }
    people_footer(array());
} else {
    /*
    	Not logged in
    */
    exit_not_logged_in();
}
// Local Variables:
// mode: php
// c-file-style: "bsd"
// End: