本文整理汇总了PHP中sbr_meta::generateDocITO方法的典型用法代码示例。如果您正苦于以下问题:PHP sbr_meta::generateDocITO方法的具体用法?PHP sbr_meta::generateDocITO怎么用?PHP sbr_meta::generateDocITO使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sbr_meta
的用法示例。
在下文中一共展示了sbr_meta::generateDocITO方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: aCreateDocITO
function aCreateDocITO($date, $doc = 'odt')
{
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/sbr_meta.php';
$objResponse = new xajaxResponse();
if (!hasPermissions('sbr')) {
return $objResponse;
}
$period = array(0 => date('Y-m-01', strtotime($date)), 1 => date('Y-m-t', strtotime($date)));
$doc_ito = sbr_meta::generateDocITO($period, true, $doc);
$date_create_id = 'date_create_' . date('Yn', strtotime($date));
$file_name_id = 'file_name_' . date('Yn', strtotime($date));
$link = WDCPREFIX . "/{$doc_ito->path}{$doc_ito->name}";
$objResponse->assign($date_create_id, 'innerHTML', date('d.m.Y H:i'));
$objResponse->script("\$('{$file_name_id}').setProperty('href', '{$link}')");
return $objResponse;
}
示例2: array
$menu_item = 4;
$rpath = '../../';
$css_file = array('moderation.css', 'new-admin.css');
$js_file = array('zeroclipboard/ZeroClipboard.js', 'user_search.js', 'admin_log.js', 'banned.js');
$header = $rpath . 'header.php';
$inner_page = "index_inner.php";
$content = '../content22.php';
$footer = $rpath . 'footer.html';
$template = 'template2.php';
$cmd = __paramInit('string', 'cmd', 'cmd', '');
if ($cmd == 'generate') {
$month = __paramInit('integer', 'month', 'month', 1);
$year = __paramInit('integer', 'year', 'year', date('Y'));
$period = array(0 => date('Y-m-01', mktime(0, 0, 0, $month, 1, $year)), 1 => date('Y-m-t', mktime(0, 0, 0, $month, 1, $year)));
$doc = __paramInit('string', 'doc', 'doc', '');
if (sbr_meta::generateDocITO($period, false, $doc)) {
header_location_exit("/siteadmin/sbr_ito/");
}
}
if ($cmd == 'upload') {
$login = 'admin';
$dir = "users/" . substr($login, 0, 2) . "/{$login}/upload/";
$doc_id = intval($_POST['doc_id']);
if (is_array($_FILES['attachedfiles_file']) && !$_FILES['attachedfiles_file']['error'] && $doc_id > 0) {
$fname = $_FILES['attachedfiles_file']['name'];
$ext = substr(strrchr($fname, "."), 1);
if ($ext != 'odt' && $ext != 'xlsx') {
?>
<script>
alert('‘ормат загружаемого файла должен быть xlsx или odt');
window.top.document.body.style.cursor = 'default';