//LIST NUM showprogress($alang['robot_robot_next_list']); showprogress('<a href="' . $theurl . '&op=robot&robotid=' . $_GET['robotid'] . '&lpage=' . $lpage . '&mpage=' . $mpage . '&mnum=' . $mnum . '&status=' . $status . '"><b>' . $alang['robot_progress_next_list'] . "</b></a>", 1); include_once template('admin/tpl/footer.htm', 1); jumpurl($theurl . '&op=robot&robotid=' . $_GET['robotid'] . '&lpage=' . $lpage . '&mpage=' . $mpage . '&mnum=' . $mnum . '&status=' . $status, 1); } } } else { showprogress($alang['robot_robot_url_error'], 1); } 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();
if (empty($theitemidarr)) { showmessage('robotmessage_op_success', $theurl); } $itemids = implode('\',\'', $theitemidarr); $query = $_SGLOBAL['db']->query('SELECT ii.* FROM ' . tname('robotmessages') . ' ii WHERE ii.itemid IN (\'' . $itemids . '\') ORDER BY ii.msgid'); while ($msg = $_SGLOBAL['db']->fetch_array($query)) { $msg = saddslashes($msg); if (empty($itemidarr[$msg['itemid']])) { continue; } $setsqlarr = array('itemid' => $itemidarr[$msg['itemid']], 'message' => $msg['message'], 'newsauthor' => $itemarr[$msg['itemid']]['author'], 'newsfrom' => $itemarr[$msg['itemid']]['itemfrom']); inserttable('spacenews', $setsqlarr); } //删除 if ($_POST['importdelete']) { delrobotmsg($theitemidarr); } else { $_SGLOBAL['db']->query('UPDATE ' . tname('robotitems') . ' SET catid=\'' . $_POST['catid'] . '\', isimport=1 WHERE itemid IN (\'' . $itemids . '\')'); } } showmessage('robotmessage_op_success', $theurl); } elseif (submitcheck('thevaluesubmit')) { //ONE UPDATE OR ADD $itemid = intval($_POST['itemid']); if ($itemid) { $setsqlarr = array(); } } //GET METHOD $catarr = array(); $view0class = $view1class = '';