本文整理汇总了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";
}
}
}