Ejemplo n.º 1
0
    }
    showprogress('<a href="' . CPURL . '?action=robotmessages&robotid=' . $_GET['robotid'] . '">' . $alang['robot_robot_result'] . '</a>', 1);
    $listarr = array();
    $thevalue = array();
    $importvalue = array();
} elseif ($_GET['op'] == 'clear') {
    delrobotmsg($_GET['robotid']);
    showmessage('robot_clear_success', $theurl);
} elseif ($_GET['op'] == 'export') {
    //ONE VIEW FOR UPDATE
    $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('robots') . ' WHERE robotid=\'' . $_GET['robotid'] . '\'');
    if ($thevalue = $_SGLOBAL['db']->fetch_array($query)) {
    } else {
        showmessage('robot_robotid_no_exists');
    }
    exportfile($thevalue, 'robot_' . $thevalue['name']);
    $listarr = array();
    $thevalue = array();
    $importvalue = array();
} elseif ($_GET['op'] == 'import') {
    $listarr = array();
    $thevalue = array();
    $importvalue = array('importtext' => '', 'ignoreversion' => '0');
} elseif ($_GET['op'] == 'exportmessage') {
    $filename = S_ROOT . './data/robot/robot_' . $_GET['robotid'] . '_message.txt';
    $filename_url = S_URL . '/data/robot/robot_' . $_GET['robotid'] . '_message.txt';
    if (@($fp = fopen($filename, 'w'))) {
        @ini_set('max_execution_time', 1000);
        showprogress($alang['exportmessage_begin'] . ' <a href="' . $filename_url . '">' . $filename_url . '</a>', 1);
        $query = $_SGLOBAL['db']->query('SELECT i.subject, m.message FROM ' . tname('robotitems') . ' i LEFT JOIN ' . tname('robotmessages') . ' m ON m.itemid=i.itemid WHERE i.robotid=\'' . $_GET['robotid'] . '\'');
        $i = 1;
Ejemplo n.º 2
0
         del_picker($pid);
         cpmsg(milu_lang('del_finsh'), PICK_GO . "picker_manage", 'succeed');
     } else {
         cpmsg(milu_lang('pick_del_confirm'), PICK_GO . 'picker_manage&myaction=pick_del&pid=' . $pid . '&submit=1', 'form');
     }
     break;
 case 'export':
     $info['pick'] = get_pick_info();
     if ($info['pick']['rules_hash']) {
         pload('F:rules');
         $info['rules'] = get_rules_info($info['pick']['rules_hash']);
     }
     $is_hava = $info['rules'] ? milu_lang('hava_system_rules') : milu_lang('no_hava_system_rules');
     $args = array('type' => milu_lang('dxc_rules'), 'author' => $_G['setting']['bbname'], 'rules_name' => $info['pick']['name'], 'rule_desc' => $is_hava);
     $info['version'] = PICK_VERSION;
     exportfile($info, $info['pick']['name'], $args);
     break;
 case 'show_article_info':
     $arr['title'] = format_url($_GET['title']);
     $arr['content'] = format_url($_GET['content']);
     $arr['article_get_type'] = $_GET['article_get_type'];
     $arr['url_page_range'] = $_GET['url_page_range'];
     $arr['page_link_rules'] = format_url($_GET['page_link_rules']);
     $url_range_type = $_GET['url_range_type'];
     $page_test_url = $_GET['page_test_url'];
     $arr['url'] = $_GET['url'];
     $arr['auto'] = $_GET['auto'];
     $page_get_type = $_GET['page_get_type'];
     $range_arr = get_url_range($arr['url_page_range']);
     if ($page_test_url) {
         $link_arr[0] = $page_test_url;
Ejemplo n.º 3
0
function fastpick_export()
{
    global $_G;
    $id = $_GET['id'];
    if (!$id) {
        cpmsg_error(milu_pick('select_rules'));
    }
    $rules_info = fastpick_info($id);
    unset($rules_info['id']);
    $args = array('type' => milu_lang('fastpick_rules'), 'author' => $_G['setting']['bbname'], 'rules_name' => $rules_info['rules_name'], 'rule_desc' => $rules_info['rule_desc']);
    $info['version'] = PICK_VERSION;
    exportfile($rules_info, $rules_info['rules_name'], $args);
}
Ejemplo n.º 4
0
function rules_export()
{
    global $_G;
    $rid = $_GET['rid'];
    if (!$rid) {
        cpmsg_error(milu_pick('select_rules'));
    }
    $rules_info = get_rules_info($rid);
    unset($rules_info['rid']);
    exportfile($rules_info, $rules_info['rules_name']);
}