Title1

Title2

Title3

6-2 go_install()

  1. go_install():用來負責建立變數

    $configs['變數類別'][$i]['name'] = '程式_變數類別_變數';
    	$configs['message_home'][$i]['name'] = 'system_message_home_title';
    	$configs['message_home'][$i]['title'] = '_MD_UGMCREATIVE_SYSTEM_NAME_2';
    	$configs['message_home'][$i]['description'] = '_MD_UGMCREATIVE_SYSTEM_NAME_2_DESC';
    	$configs['message_home'][$i]['formtype'] = 'textbox';
    	$configs['message_home'][$i]['valuetype'] = 'text';
    	$configs['message_home'][$i]['default'] = 'Message';
    
    	//---- 過濾資料 -----------------------------------------*/
    	$myts = &MyTextSanitizer::getInstance();
    
    	foreach ($configs as $kind => $config_one) {
    		foreach ($config_one as $sort => $config) {
    			if (!check_system_nameKind($config['name'], $kind)) {
    
    				$config['default'] = $myts->addSlashes($config['default']);
    
    				$sql = "insert into " . $xoopsDB->prefix("ugm_creative_system") . "
                  (`name`,`title`,`value`,`description`,`formtype`,`valuetype`,`sort`,`enable`,`kind`) values
                  ('{$config['name']}','{$config['title']}','{$config['default']}','{$config['description']}','{$config['formtype']}','{$config['valuetype']}','{$sort}','1','{$kind}')"; //die($sql);
    				$xoopsDB->queryF($sql) or redirect_header($_SERVER['PHP_SELF'], 3, mysql_error());
    
    			}
    		}
    	}
    	#------------------------------

     

  2. admin/system.php:用來負責編輯變數
  3.