本文整理汇总了PHP中DBAccess::getClassTypes方法的典型用法代码示例。如果您正苦于以下问题:PHP DBAccess::getClassTypes方法的具体用法?PHP DBAccess::getClassTypes怎么用?PHP DBAccess::getClassTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBAccess
的用法示例。
在下文中一共展示了DBAccess::getClassTypes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
}
$optionUser .= " value=\"" . $userResult[$i]['UserID'] . "\">" . $userResult[$i]['LastName'] . ", " . $userResult[$i]['FirstName'] . "</option>";
}
//Get list of events
$eventResult = DBAccess::getEvents(1);
$rows = count($eventResult, 0);
$optionEvent = "";
$optionEvent .= "<option value=\"0\">NO EVENT</option>";
for ($i = 0; $i < $rows; $i++) {
$optionEvent .= "<option ";
if ($eventResult[$i]['EventID'] == $_POST['targetEventID']) {
$optionEvent .= "selected=selected";
}
$optionEvent .= " value=\"" . $eventResult[$i]['EventID'] . "\">" . $eventResult[$i]['EventDate'] . ", " . $eventResult[$i]['EventName'] . "</option>";
}
//Get list of types
$classResult = DBAccess::getClassTypes();
$rows = count($classResult, 0);
$optionClass = "";
$optionClass .= "<option value=\"0\">NO CLASS</option>";
for ($i = 0; $i < $rows; $i++) {
$optionClass .= "<option ";
if ($classResult[$i]['ClassID'] == $_POST['targetClassID']) {
$optionClass .= "selected=selected";
}
$optionClass .= " value=\"" . $classResult[$i]['ClassID'] . "\">" . $classResult[$i]['ClassValue'] . ": " . $classResult[$i]['ClassName'] . "</option>";
}
$title = 'Create Event';
$head = '';
$content = "\n<h3 class=\"heading\">Upload a photo (member or general)</h3>\t\n\n<div class='container'>\n\t<form name=\"newEvent\" action=\"addPhoto.php\" method=\"POST\" enctype=\"multipart/form-data\">\n\t\t<label class=\"formLabel\">Photo Name</label>\n\t\t<input type=\"text\" style=\"" . $photoNameErrorStyle . "\" name=\"photoName\" class=\"formField\" value=\"" . $photoName . "\">\n\t\t<label class=\"formError\">" . $photoNameErrorText . "</label>\n\t\t\n\t\t<label class=\"formLabel\">Photo Description</label>\n\t\t<input type=\"text\" style=\"" . $photoDescriptionErrorStyle . "\" name=\"photoDescription\" class=\"formField\" value=\"" . $photoDescription . "\">\n\t\t<label class=\"formError\">" . $photoDescriptionErrorText . "</label>\n\t\t\n\t\t<label class=\"formLabel\">Photo Date</label>\n\t\t<input type=\"text\" style=\"" . $photoDateErrorStyle . "\" name=\"photoDate\" id=\"datepicker\" class=\"formField\" value=\"" . $photoDate . "\">\n\t\t<label class=\"formError\">" . $photoDateErrorText . "</label>\n\t\t\n\t\t<label class=\"formLabel\">Created by</label>\n\t\t<select class=\"formField\" name=\"targetUserID\" >\n\t\t" . $optionUser . "\n\t\t</select>\n\t\t<label class=\"formError\">" . $userIDErrorText . "</label>\n\t\t\n\t\t\n\t\t<label class=\"formLabel\">Event Name</label>\n\t\t<select class=\"formField\" name=\"targetEventID\" >\n\t\t" . $optionEvent . "\n\t\t</select>\n\t\t<label class=\"formError\">" . $eventIDErrorText . "</label>\n\t\t\n\t\t<label class=\"formLabel\">Picture Class</label>\n\t\t<select class=\"formField\" name=\"targetClassID\" >\n\t\t" . $optionClass . "\n\t\t</select>\n\t\t<label class=\"formError\">" . $classIDErrorText . "</label> \n\t\t\n\t\t\n\t\t<label class=\"formLabel\">Picture</label>\n\t\t<input type=\"file\" name=\"file\" class=\"formField\" id=\"file\">\n\t\t<label class=\"formError\">." . $classPicErrorText . "</label>\n\t\t\t\t\n\t\t<input type=\"hidden\" name=\"Submitted\" value=\"submitted\">\n\t\t\n\t\t<input type=\"submit\" value=\"Submit\" class=\"formLabel\">\n\t</form>\n\t<label class=\"error\">" . $feedBack . "</label>\n\t<span style=\"clear: left; display: block;\"></span>\n</div>\n\n";
require '../template/adminTemplate.php';