当前位置: 首页>>代码示例>>PHP>>正文


PHP Presenter::getPresenterForAdministrative方法代码示例

本文整理汇总了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";
        }
    }
}
开发者ID:kameshwariv,项目名称:testexample,代码行数:31,代码来源:administrativeAjax.php


注:本文中的Presenter::getPresenterForAdministrative方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。