00001 <?php 00002 00003 /*************************************************************************** 00004 * Copyright (C) 2009,2010 by Malakhov Alexey * 00005 * brezerk@gmail.com * 00006 * * 00007 * This program is free software: you can redistribute it and/or modify * 00008 * it under the terms of the GNU General Public License as published by * 00009 * the Free Software Foundation, either version 3 of the License, or * 00010 * (at your option) any later version. * 00011 * * 00012 * This program is distributed in the hope that it will be useful, * 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00015 * GNU General Public License for more details. * 00016 * * 00017 * You should have received a copy of the GNU General Public License * 00018 * along with this program. If not, see <http://www.gnu.org/licenses/>. * 00019 * * 00020 ***************************************************************************/ 00021 00022 require_once("./engine/check.php"); 00023 00025 if (checkUserAgent()==0){ 00026 print showAbout(); 00027 } else { 00028 require_once("./engine/db.php"); 00029 00030 $DB = new DB(); 00031 00033 $action = (int)$_POST['action']; 00034 00035 switch ($action){ 00036 case 1: 00038 print $DB->exportAppByName($_POST['search'], $_POST['page']); 00039 break; 00040 case 3: 00042 print $DB->exportAppById($_POST['appid']); 00043 break; 00044 case 4: 00046 print $DB->exportTestResults($_POST['appid'], $_POST['verid'], $_POST['testid']); 00047 break; 00048 case 5: 00050 print $DB->exportCategory($_POST['catid']); 00051 break; 00052 default: 00054 print showAbout(); 00055 break; 00056 } 00057 } 00058 ?>