<?php

defined('IN_MET') or exit ('No permission');

load::sys_func('file');



class uninstall{


	public function dodel() {

		global $_M;

		$no = 10022;

		$query = "DELETE FROM {$_M['table']['ifcolumn']} WHERE no='{$no}'";

		DB::query($query);

		$query = "DELETE FROM {$_M['table']['ifcolumn_addfile']} WHERE no='{$no}'";

		DB::query($query);

		$query = "DELETE FROM {$_M['table']['ifmember_left']} WHERE no='{$no}'";

		DB::query($query);

		$query = "DELETE FROM {$_M['table']['app_plugin']} WHERE no='{$no}'";

		DB::query($query);

		$query = "DELETE FROM {$_M['table']['applist']} WHERE no='{$no}'";

		DB::query($query);

		$query = "DELETE FROM {$_M['table']['admin_column']} WHERE field='{$no}' AND url like 'index%'";

		DB::query($query);

		$query = "DELETE FROM {$_M['table']['language']} WHERE app='{$no}'";

		DB::query($query);

		/*

		 *删除表

		 */

		$query = "DROP TABLE {$_M['table']['delimg_set']}";

		DB::query($query);

		$query = "DROP TABLE {$_M['table']['delimg_table']}";

		DB::query($query);

		$query = "DROP TABLE {$_M['table']['delimg_table_field']}";

		DB::query($query);

		/*

		 *删除、注销表名

		 */

		del_table('delimg_set');

		del_table('delimg_table');

		del_table('delimg_table_field');

		deldir('../app/app/imgdel');



		//echo '删除成功！';

	}

}

?>