本文整理匯總了PHP中Presenter::getPresenterForAdministrative方法的典型用法代碼示例。如果您正苦於以下問題:PHP Presenter::getPresenterForAdministrative方法的具體用法?PHP Presenter::getPresenterForAdministrative怎麽用?PHP Presenter::getPresenterForAdministrative使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Presenter
的用法示例。
在下文中一共展示了Presenter::getPresenterForAdministrative方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: explode
* NOTE: This only handles updates. Currently does not handle inserts.
* NOTE: There is no logic to check data types, required fields, foreign keys etc
* This is meant to be a temporary solution to allow quick updates to user data.
*/
if (isset($_POST['form']) && $_POST['form'] == "get_presenters") {
require_once APPLICATION_PATH . MODEL_DIR . '/Presenter.php';
$presenter_ids = $_POST['presenter_ids'];
if (strpos($presenter_ids, ',')) {
$presetner_id_array = explode(",", $presenter_ids);
} else {
$presetner_id_array = explode("\n", $presenter_ids);
}
$result = array();
$presenter_obj = new Presenter();
foreach ($presetner_id_array as $value) {
$presenter = $presenter_obj->getPresenterForAdministrative($value);
if ($presenter->presenter_sequence_id > 0) {
$result[] = $presenter;
}
}
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename=presenters.csv");
header("Pragma: no-cache");
header("Expires: 0");
echo "Presenter Number,First Name,Last Name,Address 1,Address 2,Address 3,City,State,Country,Email,\n";
if ($result) {
foreach ($result as $row) {
echo "{$row->presenter_sequence_id},{$row->first_name},{$row->last_name},{$row->address1},{$row->address2},{$row->address3},{$row->city},{$row->state},{$row->country},{$row->email},\n";
}
}
}