Location: PHPKode > projects > PhpChrystal - An Open Intranet System > 0.071Alpha1/phpAdminSettings.php
<?php
  session_start();
  session_set_cookie_params('32758');

  // XML::MODUL   (phpAdminSettings)
  // XML::VERSION (0.071 Alpha1)
  // XML::AUTHOR  (::[CTH]Goldenhawk::)
  // XML::INFO    (Dieses Plugin verwaltet alle Chrystal-Einstellungen)


  // XML::COMMENT (Vesrion, Name und Autor festlege)
  $PLUGIN_VERSION = "0.071 Alpha1";
  $PLUGIN_NAME    = "phpAdminSettings";
  $PLUGIN_AUTHOR  = "::[CTH]Goldenhawk::";

  // XML::COMMENT (Variablen laden)
  include_once("./classes/CCore.php");

  // XML::FUNC::getInfo ($self->getInfo())
  // XML::DESC::getInfo (liefert Name, Autor und Version des Modules zurück)
  // XML::VERSION::getInfo  (1.0)
  // XML::RETURN::getInfo ($PLUGIN_NAME,$PLUGIN_AUTHOR,$PLUGIN_VERSION)
  function getInfo()
  {
    global $PLUGIN_VERSION,$PLUGIN_NAME,$PLUGIN_AUTHOR;

    return $PLUGIN_NAME;
    return $PLUGIN_AUTHOR;
    return $PLUGIN_VERSION;
  }

  // XML::COMMENT (Falls ein Update der Einstellung durchgeführt wurde, wird automatisch weitergeleitet)
  // XML::COMMENT (Template initalisieren)
  $cdesign->initalizeTemplate($arNoOpts);

  if (!isset($_SESSION['active_userid']))
    $cfunc->faultExt($cxml->printString($lang_def["fault.not_loged_in"]));

  (!$csecure->verifyUserForAdminArea(array('iUserID' => $_SESSION['active_userid'], 'area' => $PLUGIN_NAME))) ? ($cfunc->faultExt($cxml->printString($lang_def['fault.not_authorized']))) : ($dummy);

  // XML::COMMENT (Chrystal-Einstellungen setzen anzeigen)
  if ($_GET['cmd'] == 'admin_overview')
  {
    $cl->FormNew("$PHP_SELF?cmd=cmd_update&amp;what=general","");

	$arSelect = array(
					"dhcp" 		=> $cxml->printString($lang['ar.1.dhcp']),
					"automatic" => $cxml->printString($lang['ar.1.automatic']),
					"no" 		=> $cxml->printString($lang['ar.1.no'])
					);
	$cl->cells2Noopt($cxml->printString($lang['admin.overview.ip.distribute']),$cdesign->createSelectBox("in_ip_distribute",$arSelect,$settings['lan.ip.distribute'],$arNoOpts),"out");

	$cl->cells2Noopt($cxml->printString($lang['admin.overview.ip.string']),"<input name=in_ipstring type=text maxlength=15 size=15 value=\"".$settings['lan.ip.first']."\">","out");
	$cl->cells2Noopt($cxml->printString($lang['admin.overview.email']),"<input name=in_email type=text value=\"".$settings['internet.email']."\">","out");

	$arSelect = array(
					''		=> $cxml->printString($lang['ar.4.no']),
					'user'	=> $cxml->printString($lang['ar.4.user']),
					);

	$cl->cells2Noopt($cxml->printString($lang['admin.overview.ip.server_online']),$cdesign->createSelectBox("in_ip_server_online",$arSelect,$settings['lan.ip.server_online'],$arNoOpts),"out");

	($settings['lan.anmeldung.sendemail']) ? ($bChecked = "checked") : ($bChecked = "");
	$cl->cells2Noopt($cxml->printString($lang['admin.overview.email.send']),"<input name=in_sendemail type=checkbox $bChecked value=\"1\">","out");

	($settings['lan.login.restrictions.paid']) ? ($bChecked = "checked") : ($bChecked = "");
	$cl->cells2Noopt($cxml->printString($lang['admin.overview.user.has_to_paid']),"<input name=in_paid type=checkbox $bChecked value=\"1\">","out");

	($settings['lan.anmeldung.deactivate_community']) ? ($bChecked = "checked") : ($bChecked = "");
	$cl->cells2Noopt($cxml->printString($lang['admin.overview.deactivate_community']),"<input name=in_deactivate_community type=checkbox $bChecked value=\"1\">","out");

	($settings['lan.login.restrictions.available']) ? ($bChecked = "checked") : ($bChecked = "");
	$cl->cells2Noopt($cxml->printString($lang['admin.overview.user.has_to_be_av']),"<input name=in_available type=checkbox $bChecked value=\"1\">","out");

	($settings['lan.login.user.can_change_username']) ? ($bChecked = "checked") : ($bChecked = "");
	$cl->cells2Noopt($cxml->printString($lang['admin.overview.user.can_change_username']),"<input name=in_user_can_change_username type=checkbox $bChecked value=\"1\">","out");

	($settings['lan.logout.ur_username']) ? ($bChecked = "checked") : ($bChecked = "");
	$cl->cells2Noopt($cxml->printString($lang['admin.overview.cookie.delete']),"<input name=in_ur_username type=checkbox $bChecked value=\"1\">","out");

	($settings['lan.admin.onlyshoworga']) ? ($bChecked = "checked") : ($bChecked = "");
	$cl->cells2Noopt($cxml->printString($lang['admin.overview.onlyshoworga']),"<input name=in_admin_onlyorgas type=checkbox $bChecked value=\"1\">","out");

	($settings['chrystal.debug']) ? ($bChecked = "checked") : ($bChecked = "");
	$cl->cells2Noopt($cxml->printString($lang['admin.overview.debug']),"<input name=in_debug type=checkbox $bChecked value=\"1\">","out");

	$cl->cells2Noopt($cxml->printString($lang['admin.overview.date_format']),$cl->createInput(array('type' => 'text', 'name' => 'in_absDateFormat', 'value' => $settings['lan.absDateFormat'])),"out");
	$cl->cells2Noopt($cxml->printString($lang['admin.overview.use_verisign_system']),$cl->createInput(array('type' => 'checkbox', 'name' => 'in_bUseVerisignSystem', 'value' => '1', 'checked' => $settings['lan.anmeldung.bUseVerisignSystem'])),"out");
	$cl->cells2Noopt($cxml->printString($lang['admin.overview.delete_join_after']),$cl->createInput(array('type' => 'text', 'name' => 'in_iDeleteInactiveAccountsAfter', 'maxlength' => '3', 'value' => $settings['lan.anmeldung.iDeleteInactiveAccountsAfter'])),"out");
  $cl->cells2Noopt($cxml->printString($lang['admin.overview.coins_per_user']),$cl->createInput(array('type' => 'text', 'name' => 'in_coins_per_user', 'maxlength' => '3', 'value' => $settings['lan.coins_per_user'])),"out");
	$cl->FormSubmit("2","");
  }
  elseif ($_GET['cmd'] == 'admin_data')
  {
    $cl->FormNew("$PHP_SELF?cmd=cmd_update&amp;what=data","");

	$desTop[0][text] = $cxml->printString($lang['admin.data.general']);
	$desTop[0][colspan] = 2;
	$cl->cellsTop($desTop);

	// XML::COMMENT (Anmeldephase)
	$cl->cells2Noopt($cxml->printString($lang['admin.data.change_start']),"<input type=checkbox name=in_change_start value=1> ".$cevent->createDateMenu($arNoOpts).", ".$cevent->createTimeMenu($arNoOpts),"out");
	if ($settings['lan.anmeldung.start'])
	  $cl->cells2Noopt($cxml->printString($lang['admin.data.start']),$cevent->convertTSToDB($settings['lan.anmeldung.start']),"out");

	// XML::COMMENT (Anmeldeschließung)
	$cl->cells2Noopt($cxml->printString($lang['admin.data.change_end']),"<input type=checkbox name=in_change_end value=1> ".$cevent->createDateMenu(array('fname' => '_join_end')).", ".$cevent->createTimeMenu(arraY('fname' => '_join_end')),"out");
	if ($settings['lan.anmeldung.end'])
	  $cl->cells2Noopt($cxml->printString($lang['admin.data.end']),$cevent->convertTSToDB($settings['lan.anmeldung.end']),"out");

	// XML::COMMENT (Start der LAN)
	$cl->cells2Noopt($cxml->printString($lang['admin.data.change_date_start']),"<input type=checkbox name=in_change_date_start value=1> ".$cevent->createDateMenu(array('fname' => "_start")).", ".$cevent->createTimeMenu(array('fname' => "_start")),"out");
	if ($settings['lan.data.date_start'])
	  $cl->cells2Noopt($cxml->printString($lang['admin.data.date_start']),$cevent->convertTSToDB($settings['lan.data.date_start']),"out");

	// XML::COMMENT (Ende der LAN)
	$cl->cells2Noopt($cxml->printString($lang['admin.data.change_date_end']),"<input type=checkbox name=in_change_date_end value=1> ".$cevent->createDateMenu(array('fname' => "_end")).", ".$cevent->createTimeMenu(array('fname' => "_end")),"out");
	if ($settings['lan.data.date_end'])
	  $cl->cells2Noopt($cxml->printString($lang['admin.data.date_end']),$cevent->convertTSToDB($settings['lan.data.date_end']),"out");

	// XML::CODE ($cl->cells2Noopt($cxml->printString($lang['admin.data.insert_date_in_eventorganizer']),$cl->createCheckbox(array('name' => 'in_date_into_eventorg', 'value' => '1', 'checked' => 1)),"out");)

	$cl->cells2Noopt($cxml->printString($lang['admin.data.maxusers']),"<input type=text name=in_maxusers value=\"".$settings['lan.data.maxusers']."\" size=4>","out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.maxusers.over']),"<input type=text name=in_maxusers_over value=\"".$settings['lan.data.maxusers.over']."\" size=4>","out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.join_close']),$cl->createInput(array('type' => 'checkbox', 'name' => 'in_bJoinCloseAfterMaxUsers', 'checked' => $settings['lan.data.maxusers.bJoinCloseAfterMaxUsers'])),"out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.subject']),"<input name=in_ueberschrift type=text value=\"".$settings['lan.ueberschrift']."\">","out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.nameoflan']),"<input name=in_nameoflan type=text value=\"".$settings['lan.data.nameoflan']."\">","out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.city']),"<input name=in_city type=text value=\"".$settings['lan.data.city']."\">","out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.plz']),"<input name=in_plz type=text size=5 maxlength=5 value=\"".$settings['lan.data.plz']."\">","out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.mainorga']),"<input name=in_mainorga type=text value=\"".$settings['lan.data.mainorga']."\">","out");

	$m_ar = array(	"0"  => $cxml->printString($lang['ar.2.0']),
					"16" => $cxml->printString($lang['ar.2.16']),
					"18" => $cxml->printString($lang['ar.2.18'])
				);

	$cl->cells2Noopt($cxml->printString($lang['admin.data.age']),$cdesign->createSelectBox("in_age",$m_ar,$settings['lan.data.age'],$arNoOpts),"out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.features']),"<textarea name=in_features cols=30 rows=7>".$ctext->br2nl($settings['lan.data.features'])."</textarea>","out");

	$m_ar = array(  $cxml->printString($lang['ar.3.10_100'])  => $cxml->printString($lang['ar.3.10_100']),
					$cxml->printString($lang['ar.3.10_100_sw'])  => $cxml->printString($lang['ar.3.10_100_sw']),
					$cxml->printString($lang['ar.3.10_100_sw_wlan'])  => $cxml->printString($lang['ar.3.10_100_sw_wlan']),
					$cxml->printString($lang['ar.3.10_100_1000_sw'])  => $cxml->printString($lang['ar.3.10_100_1000_sw']),
					$cxml->printString($lang['ar.3.10_100_1000_sw_wlan'])  => $cxml->printString($lang['ar.3.10_100_1000_sw_wlan']),
				);

	$cl->cells2Noopt($cxml->printString($lang['admin.data.lan_hw']),$cdesign->createSelectBox("in_lan_hw",$m_ar,$settings['lan.data.lan_hw'],$arNoOpts),"out");

	($settings['lan.data.smoking']) ? ($bChecked = "checked") : ($bChecked = "");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.smoking']),"<input type=checkbox name=in_smoking value=1 $bChecked>","out");

	($settings['lan.data.drinking']) ? ($bChecked = "checked") : ($bChecked = "");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.drinking']),"<input type=checkbox name=in_drinking value=1 $bChecked>","out");

	($settings['lan.data.internet']) ? ($bChecked = "checked") : ($bChecked = "");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.internet']),"<input type=checkbox name=in_internet value=1 $bChecked>","out");

	($settings['lan.data.woman_no_pay']) ? ($bChecked = "checked") : ($bChecked = "");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.woman_no_pay']),"<input type=checkbox name=in_woman_no_pay value=1 $bChecked>","out");

	$cl->cellsDummy("2","");
	$cl->cellsTop(array(array('text' => $cxml->printString($lang['admin.data.wwcl']), 'colspan' => 2)));

	$cl->cells2Noopt($cxml->printString($lang['admin.data.wwcl.pid']),"<input type=text name=in_wwcl_pid value=\"".$settings['lan.wwcl.pid']."\" maxlength=6 size=6 title=\"siehe URL der WWCL-Terminliste\">","out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.wwcl.pvid']),"<input type=text name=in_wwcl_pvid value=\"".$settings['lan.wwcl.pvid']."\" maxlength=6 size=6 title=\"kann unter http://pvd.planetlan.de beantragt werden\">","out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.wwcl.partyname']),"<input type=text name=in_wwcl_partyname value=\"".$settings['lan.wwcl.partyname']."\" title=\"Name der LAN\">","out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.wwcl.city']),"<input type=text name=in_wwcl_city value=\"".$settings['lan.wwcl.city']."\" title=\"Name der Stadt, in der die LAN stattfindet\">","out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.wwcl.datum']),"<input type=text name=in_wwcl_datum size=10 maxlength=10 value=\"".$settings['lan.wwcl.datum']."\" title=\"Format: tt.mm.jj\">","out");

	$cl->cellsDummy("2","");
	$cl->cellsTop(array(array('text' => $cxml->printString($lang['admin.data.ngl']), 'colspan' => 2)));

	$cl->cells2Noopt($cxml->printString($lang['admin.data.ngl.eventid']),$cl->createInput(array('type' => 'text', 'name' => 'in_ngl_eventid', 'value' => $settings['lan.ngl.eventid'], 'size' => '6')),"out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.ngl.partyname']),$cl->createInput(array('type' => 'text', 'name' => 'in_ngl_partyname', 'value' => $settings['lan.ngl.partyname'])),"out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.ngl.contact']),$cl->createInput(array('type' => 'text', 'name' => 'in_ngl_contact', 'value' => $settings['lan.ngl.contact'])),"out");
	$cl->cells2Noopt($cxml->printString($lang['admin.data.ngl.date']),$cl->createInput(array('type' => 'text', 'name' => 'in_ngl_date', 'value' => $settings['lan.ngl.date'], 'size' => '10')),"out");
	$cl->FormSubmit("2","");
  }
  elseif ($_GET['cmd'] == 'admin_design')
  {
    $cl->FormNew("$PHP_SELF?cmd=cmd_update&amp;what=design","");
	($design['fading']) ? ($bChecked = "checked") : ($bChecked = "");
  	$cl->cells2Noopt($cxml->printString($lang['admin.design.fading']),"<input name=in_fading type=checkbox title=\"Damit der Seitenübergang aktiviert werden kann, muss im IE unter 'Einstellungen->Erweitert->Seitenübergänge aktivieren' aktiviert werden.\" value=1 $bChecked>","out");
  	$cl->cells2Noopt($cxml->printString($lang['admin.design.newwindow.width']),"<input name=in_newwindow_width type=text value=\"".$design['newwindow.width']."\" size=4>","out");
  	$cl->cells2Noopt($cxml->printString($lang['admin.design.newwindow.height']),"<input name=in_newwindow_height type=text value=\"".$design['newwindow.height']."\" size=4>","out");
  	$cl->cells2Noopt($cxml->printString($lang['admin.design.newwindow.scrollx']),"<input name=in_newwindow_scrollx type=text value=\"".$design['newwindow.scrollx']."\" size=4>","out");
  	$cl->cells2Noopt($cxml->printString($lang['admin.design.newwindow.scrolly']),"<input name=in_newwindow_scrolly type=text value=\"".$design['newwindow.scrolly']."\" size=4>","out");
  	$cl->cells2Noopt($cxml->printString($lang['admin.design.newwindow.posx']),"<input name=in_newwindow_posx type=text value=\"".$design['newwindow.posx']."\" size=4>","out");
  	$cl->cells2Noopt($cxml->printString($lang['admin.design.newwindow.posy']),"<input name=in_newwindow_posy type=text value=\"".$design['newwindow.posy']."\" size=4>","out");

  	$cl->cells2Noopt($cxml->printString($lang['admin.design.thumbnails.width']),"<input name=in_thumbnails_width type=text value=\"".$design['images.thumbnails.width']."\" size=4>","out");
  	$cl->cells2Noopt($cxml->printString($lang['admin.design.thumbnails.height']),"<input name=in_thumbnails_height type=text value=\"".$design['images.thumbnails.height']."\" size=4>","out");

  	($design['input_instead_select']) ? ($bChecked = "checked") : ($bChecked = "");
  	$cl->cells2Noopt($cxml->printString($lang['admin.design.input_instead_select']),"<input name=in_input_instead_select type=checkbox value=1 $bChecked>","out");
	$cl->cells2Noopt($cxml->printString($lang['admin.design.loginlist_onlypaidav']),$cl->createInput(array('type' => 'checkbox', 'name' => 'in_bLoginSelectInIntranetOnlyAvailablePaid', 'checked' => $design['bLoginSelectInIntranetOnlyAvailablePaid'])),"out");

  	($design['javascript.bUseJSHotkey']) ? ($bChecked = "checked") : ($bChecked = "");
  	$cl->cells2Noopt($cxml->printString($lang['admin.design.use_js_hotkey']),"<input name=in_use_js_hotkey type=checkbox value=1 $bChecked>","out");

  	// ($design['no_community_users']) ? ($bChecked = "checked") : ($bChecked = "");
  	// $cl->cells2Noopt($cxml->printString($lang['admin.design.no_community_users']),"<input name=in_no_community_users type=checkbox value=1 $bChecked>","out");

	// ($design['display.userlist.bNoOrgas']) ? ($bChecked = "checked") : ($bChecked = "");
	// $cl->cells2Noopt($cxml->printString($lang['admin.design.display.no_orgas']),$cl->createInput(array('type' => 'checkbox', 'name' => 'in_bNoOrgas', 'checked' => $bChecked)),"out");

	$cl->cells2Noopt($cxml->printString($lang['admin.design.display.lifetime']),"<input type=text name=in_display_lifetime size=4 maxlength=4 value=\"".$cevent->convertSecondsToDays($arOpts['db_timeout'])."\"> ".$cxml->printString($lang['admin.design.days']),"out");

	$cl->cellsDummy("2","out");
	$cl->cellsTop(array(array('text' => $cxml->printString($lang['admin.design.subject.entries']),'colspan' => 2)));
	$cl->TableText(array(array('text' => $cxml->printString($lang['admin.design.entries']),'colspan' => 2)));
	$cl->FormSubmit("2","");
  }
  elseif ($_GET['cmd'] == 'admin_templates')
  {
	if (!$dir)
	{
	  $desText[0][text] = $cxml->printString($lang['admin.templates.template']);
	  $desText[1][text] = $cxml->printString($lang['admin.templates.information']);
	  $cl->cellsTop($desText);
	  $m_ar = array();

	  $p_dir = opendir('./templates');
	  while ($subdir = readdir($p_dir))
	  {
        if ($subdir != "." && $subdir != "..")
        {
          if (is_dir("./templates/".$subdir))
          {
  	        if (preg_match("/sites.(.*)/i",$subdir,$ar))
  	        {
  	          array_push($m_ar,$subdir);
  	          $cl->cells2Noopt($subdir,"<a href=\"$PHP_SELF?cmd=admin_templates&amp;dir=$subdir\">".$cxml->printString($lang['admin.templates.information'])."</a>","out");
            }
          }
        }
	  }
	  $cl->cellsDummy("2","");
	  $cl->FormNew("$PHP_SELF?cmd=cmd_update&amp;what=template","");
	  $cl->cells2Noopt($cxml->printString($lang['admin.templates.active_theme']),$cdesign->createSelectBox("in_theme",$ctext->convertArrayToHash($m_ar,$arNoOpts),$design['use_template'],$arNoOpts),"out");
	  $cl->FormSubmit("2",$cxml->printString($lang['admin.templates.form.load']));
	  $cl->cellsDummy("2","Test");
	  $desOut[0][text] = $cxml->printString($lang['admin.templates.tplwebsite']);
	  $desOut[0][colspan] = "2";
	  $desOut[0][align] = "center";
	  $cl->TableText($desOut);
	}
	else
	{
	  $arRet = $cdesign->parseXMLPrefFile(array('szTheme' => $dir));

      $cl->FormNew("$PHP_SELF?cmd=cmd_update&amp;what=template&amp;in_theme=$dir","");

	  while(list($key,$val) = each($arRet))
	  {
  	    $cl->cells2Noopt($cxml->printString($lang_def['pref.'.$key]),nl2br(htmlentities($arRet[$key]['szValue'])),"out");
	  }

	  $cl->FormSubmit("2",$cxml->printString($lang['admin.templates.form.activate']));
	}
  }
  // XML::COMMENT Chrystal-Einstellungen ausführen
  elseif ($_GET['cmd'] == 'cmd_update')
  {
	if ($_GET['what'] == 'general')
	{
	  ((!$cfunc->checkIPAddress($in_ipstring)) && ($in_ip_distribute == 'automatic')) ? ($cfunc->faultExt($cxml->printString($lang_def['fault.ip_format']))) : ($dummy);

	  $cfunc->setSetting(array(key=>"internet.email",value=>$in_email));
	  $cfunc->setSetting(array(key=>"lan.ip.first",value=>$in_ipstring));
	  $cfunc->setSetting(array(key=>"lan.ip.distribute",value=>$in_ip_distribute));
	  $cfunc->setSetting(array(key=>"lan.ip.server_online",value=>$in_ip_server_online));

	  $cuser->reassignIPForUsers(array('method' => $in_ip_distribute));

	  $cfunc->setSetting(array(key=>"lan.anmeldung.sendemail",value=>$in_sendemail));
	  $cfunc->setSetting(array(key=>"lan.anmeldung.deactivate_community",value=>$in_deactivate_community));
	  $cfunc->setSetting(array(key=>"lan.login.restrictions.paid",value=>$in_paid));
	  $cfunc->setSetting(array(key=>"lan.login.restrictions.available",value=>$in_available));
	  $cfunc->setSetting(array(key=>"lan.logout.ur_username",value=>$in_ur_username));
	  $cfunc->setSetting(array(key=>"lan.login.user.can_change_username",value=>$in_user_can_change_username));
	  $cfunc->setSetting(array(key=>"lan.admin.onlyshoworga",value=>$in_admin_onlyorgas));
	  $cfunc->setSetting(array(key=>"chrystal.debug",value=>$in_debug));
	  $cfunc->setSetting(array(key=>"lan.absDateFormat",value=> $_POST['in_absDateFormat']));
	  $cfunc->setSetting(array(key=>"lan.anmeldung.bUseVerisignSystem",value=> $_POST['in_bUseVerisignSystem']));
	  $cfunc->setSetting(array(key=>"lan.anmeldung.bProofPersonal",value=> $_POST['in_bProofPersonal']));
	  $cfunc->setSetting(array(key=>"lan.anmeldung.iDeleteInactiveAccountsAfter",value=> $_POST['in_iDeleteInactiveAccountsAfter']));
	  $cfunc->setSetting(array(key=>"lan.coins_per_user", value=> $_POST['in_coins_per_user']));
	}
	elseif ($_GET['what'] == 'data')
	{
	  if ($in_wwcl_datum)
	    if (!preg_match("/^(..).(..).(....)/i",$in_wwcl_datum,$ar))
	      $cfunc->faultExt($cxml->printString($lang_def['update.fault.wwcl_date']));

	  if (($in_month) && ($in_change_start))
	  {
	    $cfunc->setSetting(array(key=>"lan.anmeldung.start",value=>mktime($in_hour,$in_min,0,$in_month,$in_day,$in_year)));
	    $cevent->addEvent(array('tsDate' => mktime($in_hour,$in_min,0,$in_month,$in_day,$in_year), 'szSubject' => $cxml->printString($lang['event.join.start.subject'],$in_nameoflan), 'szDesc' => $cxml->printString($lang['event.join.start.desc'],$in_nameoflan),'szLocation' => $in_city));
	  }

	  if (($in_month_join_end) && ($in_change_end))
	    $cfunc->setSetting(array(key=>"lan.anmeldung.end",value=>mktime($in_hour_join_end,$in_min_join_end,0,$in_month_join_end,$in_day_join_end,$in_year_join_end)));

	  if (($in_month_start) && ($in_change_date_start))
	  {
	    $cfunc->setSetting(array(key=>"lan.data.date_start",value=>mktime($in_hour_start,$in_min_start,0,$in_month_start,$in_day_start,$in_year_start)));
	    $cevent->addEvent(array('tsDate' => mktime($in_hour_start,$in_min_start,0,$in_month_start,$in_day_start,$in_year_start), 'szSubject' => $cxml->printString($lang['event.lan.start.subject'],$in_nameoflan), 'szDesc' => $cxml->printString($lang['event.lan.start.desc'],$in_nameoflan),'szLocation' => $in_city));
	  }

	  if (($in_month_end) && ($in_change_date_end))
	  {
	    $cfunc->setSetting(array(key=>"lan.data.date_end",value=>mktime($in_hour_end,$in_min_end,0,$in_month_end,$in_day_end,$in_year_end)));
	    $cevent->addEvent(array('tsDate' => mktime($in_hour_end,$in_min_end,0,$in_month_end,$in_day_end,$in_year_end), 'szSubject' => $cxml->printString($lang['event.lan.end.subject'],$in_nameoflan), 'szDesc' => $cxml->printString($lang['event.lan.end.desc'],$in_nameoflan),'szLocation' => $in_city));
	  }

	  $cfunc->setSetting(array(key=>"lan.ueberschrift",value=>$in_ueberschrift));
	  $cfunc->setSetting(array(key=>"lan.data.maxusers",value=>$in_maxusers));
	  $cfunc->setSetting(array(key=>"lan.data.maxusers.over",value=>$in_maxusers_over));
	  $cfunc->setSetting(array(key=>"lan.data.maxusers.bJoinCloseAfterMaxUsers",value=>$_POST['in_bJoinCloseAfterMaxUsers']));
	  $cfunc->setSetting(array(key=>"lan.data.termin",value=>$in_termin));
	  $cfunc->setSetting(array(key=>"lan.data.internet",value=>$in_internet));
	  $cfunc->setSetting(array(key=>"lan.data.nameoflan",value=>$in_nameoflan));
	  $cfunc->setSetting(array(key=>"lan.data.drinking",value=>$in_drinking));
	  $cfunc->setSetting(array(key=>"lan.data.smoking",value=>$in_smoking));
	  $cfunc->setSetting(array(key=>"lan.data.woman_no_pay",value=>$in_woman_no_pay));

	  $cfunc->setSetting(array(key=>"lan.data.mainorga",value=>$in_mainorga));
	  $cfunc->setSetting(array(key=>"lan.data.plz",value=>$in_plz));
	  $cfunc->setSetting(array(key=>"lan.data.city",value=>$in_city));
	  $cfunc->setSetting(array(key=>"lan.data.age",value=>$in_age));
	  $cfunc->setSetting(array(key=>"lan.data.features",value=> $ctext->convertStringToDB($_SESSION['active_userid'],$in_features)));
	  $cfunc->setSetting(array(key=>"lan.data.lan_hw",value=>$in_lan_hw));
	  $cfunc->setSetting(array(key=>"lan.wwcl.pid",value=>$in_wwcl_pid));
	  $cfunc->setSetting(array(key=>"lan.wwcl.pvid",value=>$in_wwcl_pvid));
	  $cfunc->setSetting(array(key=>"lan.wwcl.partyname",value=>$in_wwcl_partyname));
	  $cfunc->setSetting(array(key=>"lan.wwcl.city",value=>$in_wwcl_city));
	  $cfunc->setSetting(array(key=>"lan.wwcl.datum",value=>$in_wwcl_datum));
	  $cfunc->setSetting(array(key=>"lan.ngl.eventid",value=>$in_ngl_eventid));
	  $cfunc->setSetting(array(key=>"lan.ngl.date",value=>$in_ngl_date));
	  $cfunc->setSetting(array(key=>"lan.ngl.partyname",value=>$in_ngl_partyname));
	  $cfunc->setSetting(array(key=>"lan.ngl.contact",value=>$in_ngl_contact));
	}
    elseif ($_GET['what'] == 'design')
    {
      $cdesign->setDesignSetting(array(key=>"no_community_users",value=>$in_no_community_users));
	  $cdesign->setDesignSetting(array(key=>"fading",value=>$in_fading));
	  $cdesign->setDesignSetting(array(key=>"newwindow.width",value=>$in_newwindow_width));
	  $cdesign->setDesignSetting(array(key=>"newwindow.height",value=>$in_newwindow_height));
      $cdesign->setDesignSetting(array(key=>"newwindow.scrollx",value=>$in_newwindow_scrollx));
	  $cdesign->setDesignSetting(array(key=>"newwindow.scrolly",value=>$in_newwindow_scrolly));
	  $cdesign->setDesignSetting(array(key=>"newwindow.posx",value=>$in_newwindow_posx));
	  $cdesign->setDesignSetting(array(key=>"newwindow.posy",value=>$in_newwindow_posy));
	  $cdesign->setDesignSetting(array(key=>"display.entries.max",value=>$in_display_entries));
	  $cdesign->setDesignSetting(array(key=>"display.entries.max.userlist",value=>$in_use_display_entries_for_userlist));
	  $cdesign->setDesignSetting(array(key=>"display.userlist.bNoOrgas",value=>$_POST['in_bNoOrgas']));
	  $cdesign->setDesignSetting(array(key=>"display.entries.direc",value=>$in_display_direc));
	  $cdesign->setDesignSetting(array(key=>"display.entries.lifetime",value=>$cevent->convertDaysToSeconds($in_display_lifetime)));
	  $cdesign->setDesignSetting(array(key=>"images.thumbnails.width",value=>$in_thumbnails_width));
	  $cdesign->setDesignSetting(array(key=>"images.thumbnails.height",value=>$in_thumbnails_height));
	  $cdesign->setDesignSetting(array(key=>"input_instead_select",value=>$in_input_instead_select));
	  $cdesign->setDesignSetting(array(key=>"bLoginSelectInIntranetOnlyAvailablePaid",value=>$_POST['in_bLoginSelectInIntranetOnlyAvailablePaid']));
	  $cdesign->setDesignSetting(array(key=>"javascript.bUseJSHotkey",value=>$in_use_js_hotkey));
	}
	elseif ($_GET['what'] == 'template')
	{
	  $arRet = $cdesign->parseXMLPrefFile(array('szTheme' => $in_theme));

	  while (list($key,$val) = each($arRet))
	  {
	    unset($arOpts);

	    if (!$arRet[$key]['szKey'])
	      continue;

	    $arOpts['key'] 	= $arRet[$key]['szKey'];
	    $arOpts['value']	= $arRet[$key]['szValue'];

	    if ($arRet[$key]['bUseFuncSetSetting'])
	      $cfunc->setSetting($arOpts);
	    else
	      $cdesign->setDesignSetting($arOpts);
	  }

	  if ($arRet['bLoadXMLMenu'])
	    $cdesign->handleDatabaseXMLMenu(array('bCopyXMLMenuFileToDatabase' => 1, 'szTheme' => $in_theme));
	}
	printDanke();
  }
  else
  {
    $cfunc->faultExt($cxml->printString($lang_def['fault.not_registered']));
  }


  // XML::COMMENT (Seite abschließen)
  $cdesign->createSiteFooter($arOpts);
?>
Return current item: PhpChrystal - An Open Intranet System