Example #1
0
     $title = getValueFromID($notices_table, $id, "title");
     $notice = getValueFromID($notices_table, $id, "notice");
     $author = getValueFromID($notices_table, $id, "author");
     $display_date = strtotime(getValueFromID($notices_table, $id, "display_date"));
     $importance = getValueFromID($notices_table, $id, "importance");
     $typeface = getValueFromID($notices_table, $id, "typeface");
     $size = getValueFromID($notices_table, $id, "size");
     echo "\n<form method=\"POST\" action=\"{$PHP_SELF}?action=edit_notice&id={$id}&display_date={$display_date}&username={$username}&password={$password}\">";
     echo "\n<table bgcolor={$table_heading_bgcolour} width=100%>";
     echo "\n<tr><td colspan=2><h2>Edit Notice</h2></td></tr>";
     echo "\n<tr><td>Date(s):</td><td>" . getDateList(false, $display_date) . "</td></tr>";
     echo "\n<tr><td>Title:</td><td><input type=\"text\" size=40 value=\"{$title}\" name=\"txttitle\"></td></tr>";
     echo "\n<tr><td>Notice:</td><td><textarea rows=5 cols=40 name=\"txtnotice\">{$notice}</textarea></td></tr>";
     echo "\n<tr><td>Author:</td><td><input type=\"text\" size=40 value=\"{$author}\" name=\"txtauthor\"></td></tr>";
     echo "\n<tr><td>Importance:</td><td>" . getImportanceList($importance) . "</td></tr>";
     echo "\n<tr><td>Who should see this notice?:</td><td>" . getEditUserList($id) . "</td></tr>";
     echo "\n<tr><td>Typeface:</td><td>" . getTypeFaceList($typeface) . "</td></tr>";
     echo "\n<tr><td>Size:</td><td>" . getFontSizeList($size) . "<p>";
     echo "\n<input type=\"submit\" value=\"Save Changes\" name=\"B1\"></td></tr>";
     echo "\n</table>";
     echo "\n</form>";
 } else {
     $tempDate = getVAR("lstdate");
     $tempTitle = mysql_real_escape_string(getVAR("txttitle"));
     $tempNotice = mysql_real_escape_string(getVAR("txtnotice"));
     $tempAuthor = mysql_real_escape_string(getVAR("txtauthor"));
     $tempImportance = getVAR("lstimportance");
     $tempUsers = getVAR("lstusers");
     $tempTypeface = getVAR("lsttypeface");
     $tempFontsize = getVAR("lstfontsize");
     $tempDateAdded = date("Y-m-d H:i:s", time());
Example #2
0
/**
 * @param Kimai_Database_Mysql $database
 * @param array $kgaUser
 * @param bool $viewOtherGroupsAllowed
 * @return array
 */
function getUsersData(Kimai_Database_Mysql $database, $kgaUser, $viewOtherGroupsAllowed)
{
    $result = array('showDeletedUsers' => get_cookie('adminPanel_extension_show_deleted_users', 0), 'curr_user' => $kgaUser['name'], 'users' => getEditUserList($database, $kgaUser, $viewOtherGroupsAllowed));
    return $result;
}