本文整理汇总了PHP中Export::saveOrganizations方法的典型用法代码示例。如果您正苦于以下问题:PHP Export::saveOrganizations方法的具体用法?PHP Export::saveOrganizations怎么用?PHP Export::saveOrganizations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Export
的用法示例。
在下文中一共展示了Export::saveOrganizations方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
}
}
$num = count($_POST['ids']);
if ($i && $i == $num) {
$msg = 'Selected users removed successfully';
} elseif ($i > 0) {
$warn = "{$i} of {$num} selected users removed";
} elseif (!$errors['err']) {
$errors['err'] = 'Unable to remove selected users';
}
}
break;
default:
$errors['err'] = 'Unknown action';
}
} elseif ($_REQUEST['a'] == 'export') {
require_once INCLUDE_DIR . 'class.export.php';
$ts = strftime('%Y%m%d');
if (!($token = $_REQUEST['qh'])) {
$errors['err'] = 'Query token required';
} elseif (!($query = $_SESSION['orgs_qs_' . $token])) {
$errors['err'] = 'Query token not found';
} elseif (!Export::saveOrganizations($query, "organizations-{$ts}.csv", 'csv')) {
$errors['err'] = 'Internal error: Unable to export results';
}
}
$page = $org ? 'org-view.inc.php' : 'orgs.inc.php';
$nav->setTabActive('users');
require STAFFINC_DIR . 'header.inc.php';
require STAFFINC_DIR . $page;
include STAFFINC_DIR . 'footer.inc.php';
示例2: elseif
}
elseif ($_POST['count'] && $count != $_POST['count']) {
$warn = __('Not all selected items were updated');
}
elseif ($count) {
$msg = __('Successfully managed selected organizations');
}
}
break;
default:
$errors['err'] = __('Unknown action');
}
} elseif ($_REQUEST['a'] == 'export') {
require_once(INCLUDE_DIR.'class.export.php');
$ts = strftime('%Y%m%d');
if (!($token=$_REQUEST['qh']))
$errors['err'] = __('Query token required');
elseif (!($query=$_SESSION['orgs_qs_'.$token]))
$errors['err'] = __('Query token not found');
elseif (!Export::saveOrganizations($query, __('organizations')."-$ts.csv", 'csv'))
$errors['err'] = __('Internal error: Unable to export results');
}
$page = $org? 'org-view.inc.php' : 'orgs.inc.php';
$nav->setTabActive('users');
require(STAFFINC_DIR.'header.inc.php');
require(STAFFINC_DIR.$page);
include(STAFFINC_DIR.'footer.inc.php');
?>