Ejemplo n.º 1
0
function modify_schedulation()
{
    checkPerm('mod');
    //preload schedulation data in session
    require_once $GLOBALS['where_lms'] . '/lib/lib.report.php';
    if ($id_sched = Get::req('id_sched', DOTY_INT, false)) {
        $qry = "SELECT * FROM " . $GLOBALS['prefix_lms'] . "_report_schedule WHERE id_report_schedule={$id_sched}";
        $row = mysql_fetch_assoc(sql_query($qry));
        $recipients = array();
        $qry = "SELECT * FROM " . $GLOBALS['prefix_lms'] . "_report_schedule_recipient WHERE id_report_schedule={$id_sched}";
        $recs = sql_query($qry);
        while ($trow = mysql_fetch_assoc($recs)) {
            $recipients[] = $trow['id_user'];
        }
        $period = explode(',', $row['period']);
        $_SESSION['schedule_update'] = $id_sched;
        //integer value, <>0 and <>false
        $_SESSION['schedule_tempdata'] = array('name' => $row['name'], 'period' => $period[0], 'period_info' => $period[1], 'time' => '', 'recipients' => $recipients);
        $rid = $row['id_report_filter'];
        $_SESSION['report_saved'] = true;
        $_SESSION['report_saved_data'] = array('id' => $rid, 'name' => getReportNameById($rid));
        schedule_report(Get::req('idrep', DOTY_INT, false));
    } else {
        Util::jump_to('index.php?modname=report&op=schedulelist');
        //if error jump to start page
    }
}
Ejemplo n.º 2
0
function mod_report_name()
{
    checkPerm('mod');
    require_once _base_ . '/lib/lib.form.php';
    //require_once($GLOBALS['where_framework'].'/lib/lib.json.php');
    require_once $GLOBALS['where_lms'] . '/admin/modules/report/class.report.php';
    //reportbox class
    require_once $GLOBALS['where_lms'] . '/lib/lib.report.php';
    //require_once('report_categories.php');
    load_categories();
    $lang =& DoceboLanguage::createInstance('report');
    $idrep = Get::req('modid', DOTY_INT, false);
    //if (!idrep) Util::jump_to(initial page ... )
    $page_title = getTitleArea(array('index.php?modname=public_report_admin&amp;op=reportlist' => $lang->def('_REPORT'), $lang->def('_REPORT_MOD_NAME')), 'report');
    $GLOBALS['page']->add($page_title . '<div class="std_block">', 'content');
    $info = get_update_info();
    if ($info) {
        $GLOBALS['page']->add(getInfoUi($info), 'content');
    }
    $box = new ReportBox('report_modify_name');
    $box->title = $lang->def('_REPORT_MOD_NAME');
    $box->description = $lang->def('_REPORT_MODNAME_DESC');
    $box->body = Form::openForm('repcat_form', 'index.php?modname=public_report_admin&amp;op=modify_rows&amp;modid=' . $idrep) . Form::getHidden('mod_name', 'mod_name', 1);
    //$json = new Services_JSON();
    //$rdata =& getFilterData($idrep);
    //Form::getHidden('report_filter_data', 'report_filter_data', $json->encode($rdata));
    $box->body .= Form::getTextField($lang->def('_MOD_REPORT_NAME'), 'report_name', 'report_name', '200', getReportNameById($idrep));
    $box->body .= Form::openButtonSpace() . Form::getButton('', '', $lang->def('_FORWARD'), false) . Form::closeButtonSpace() . Form::closeForm();
    $GLOBALS['page']->add($box->get(), 'content');
    /*$lang->def('_REPORT_SCHEDMAN');$lang->def('_REPORT_SCHEDMAN_DESC');*/
    $GLOBALS['page']->add('</div>', 'content');
}
Ejemplo n.º 3
0
function report_modify_name()
{
    checkPerm('mod');
    require_once _lms_ . '/admin/modules/report/class.report.php';
    //reportbox class
    require_once _lms_ . '/lib/lib.report.php';
    //require_once('report_categories.php');
    load_categories();
    $lang =& DoceboLanguage::createInstance('report');
    $idrep = Get::req('modid', DOTY_INT, false);
    //if (!idrep) Util::jump_to(initial page ... )
    $page_title = getTitleArea(array('index.php?modname=report&amp;op=reportlist' => $lang->def('_REPORT'), $lang->def('_MOD')), 'report');
    cout($page_title . '<div class="std_block">');
    $info = get_update_info();
    //if($info) cout( getInfoUi($info) );
    $box = new ReportBox('report_modify_name');
    $box->title = $lang->def('_MOD');
    $box->description = false;
    $box->body = Form::openForm('repcat_form', 'index.php?modname=report&op=modify_rows&modid=' . $idrep) . Form::getHidden('mod_name', 'mod_name', 1);
    $box->body .= Form::getTextField($lang->def('_NAME'), 'report_name', 'report_name', '200', getReportNameById($idrep));
    $box->body .= Form::openButtonSpace() . Form::getButton('', '', $lang->def('_NEXT')) . Form::closeButtonSpace() . Form::closeForm();
    cout($box->get());
    cout('</div>', 'content');
}