예제 #1
0
 public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     $type = isset($request['type']) ? $request['type'] : 'setup';
     $action = isset($request['action']) ? $request['action'] : '';
     if (isset($request['delete'])) {
         $action = 'delete';
     }
     $language_id = isset($request['language_id']) ? $request['language_id'] : false;
     $description = isset($request['description']) ? $request['description'] : '';
     $lang_code = isset($request['lang_code']) ? $request['lang_code'] : '';
     $dest = isset($request['dest']) ? $request['dest'] : '';
     $view = isset($request['view']) ? $request['view'] : '';
     if (isset($request['goto0']) && $request['goto0']) {
         $dest = $request[$request['goto0'] . '0'];
     }
     switch ($action) {
         case 'add':
             $request['extdisplay'] = languages_add($description, $lang_code, $dest);
             needreload();
             break;
         case 'edit':
             languages_edit($language_id, $description, $lang_code, $dest);
             needreload();
             break;
         case 'delete':
             languages_delete($language_id);
             needreload();
             break;
     }
 }
예제 #2
0
     exit(1);
 }
 call_user_func(Logging::$f['EDIT_LANGUAGES_USE']);
 $languages = languages_get_all();
 $reload_languages = false;
 // Add new language.
 if (isset($_POST['new_language']) && $_POST['new_language'] !== '') {
     $code = languages_check_code($_POST['new_language']);
     if ($code === FALSE) {
         // Cleanup.
         DataExchange::releaseResources();
         Logging::close_log();
         display_error_page($smarty, kotoba_last_error());
         exit(1);
     } else {
         languages_add($code);
         create_language_directories($code);
         $reload_languages = true;
     }
 }
 // Delete languages.
 foreach ($languages as $language) {
     if (isset($_POST['delete_' . $language['id']])) {
         languages_delete($language['id']);
         $reload_languages = true;
     }
 }
 if ($reload_languages) {
     $languages = languages_get_all();
 }
 // Generate html code of edit languages page and display it.
예제 #3
0
 */
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : 'setup';
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
if (isset($_REQUEST['delete'])) {
    $action = 'delete';
}
$language_id = isset($_REQUEST['language_id']) ? $_REQUEST['language_id'] : false;
$description = isset($_REQUEST['description']) ? $_REQUEST['description'] : '';
$lang_code = isset($_REQUEST['lang_code']) ? $_REQUEST['lang_code'] : '';
$dest = isset($_REQUEST['dest']) ? $_REQUEST['dest'] : '';
if (isset($_REQUEST['goto0']) && $_REQUEST['goto0']) {
    $dest = $_REQUEST[$_REQUEST['goto0'] . '0'];
}
switch ($action) {
    case 'add':
        languages_add($description, $lang_code, $dest);
        needreload();
        redirect_standard();
        break;
    case 'edit':
        languages_edit($language_id, $description, $lang_code, $dest);
        needreload();
        redirect_standard('extdisplay');
        break;
    case 'delete':
        languages_delete($language_id);
        needreload();
        redirect_standard();
        break;
}
?>