Exemple #1
0
 public function __toString()
 {
     $ret = "<table class=\"{$this->class}\">";
     $ret .= "<tr class=\"{$this->class}\">";
     foreach ($this->head as $h) {
         $ret .= "<td class=\"{$this->class}\">" . __l($h) . "</td>";
     }
     $ret .= "</tr>";
     foreach ($this->dataModel as $row) {
         $ret .= "<tr class=\"{$this->class}\">";
         foreach ($row as $column) {
             if (is_array($column)) {
                 $ret .= "<td class=\"{$this->class}\"><a href=\"" . $column["url"] . "\"><img src=\"" . $column["image"] . "\"></a></td>";
             } else {
                 $ret .= "<td class=\"{$this->class}\">" . __l($column) . "</td>";
             }
         }
         $ret .= "</tr>";
     }
     $ret .= "</table>";
     return $ret;
 }
Exemple #2
0
 public function __toString()
 {
     $ret = "<tr>";
     $ret .= "<td class=\"formLabel\">";
     $ret .= "<label for=\"" . $this->fieldName . "\">" . $this->label . "</label>";
     $ret .= "</td>";
     $ret .= "<td class=\"formField\">";
     $ret .= "<select id=\"" . $this->fieldName . "\" name=\"" . $this->fieldName . "\" type=\"" . $this->fieldType . "\" " . ($this->required ? "required" : "");
     foreach ($this->attrs as $name => $value) {
         $ret .= " {$name}=\"{$value}\"";
     }
     $ret .= ">";
     if ($this->default !== "") {
         $ret .= "<option value=\"" . $this->default . "\">" . __l($this->dataModel[$this->default]) . "</option>";
     }
     foreach ($this->dataModel as $key => $value) {
         $ret .= "<option value=\"{$key}\">" . __l($value) . "</option>";
     }
     $ret .= "</select>";
     $ret .= "</td>";
     $ret .= "</tr>";
     return $ret;
 }
        } else {
            if ($ReturnStatus == 'Your account has been created. Your account will be enabled when the administrator approves it.') {
                $ReturnStatus = __l('Your account has been created. Your account will be enabled when the administrator approves it.');
            } else {
                if ($ReturnStatus == 'Invalid characters detected.') {
                    $ReturnStatus = __l('Invalid characters detected.');
                } else {
                    if ($ReturnStatus == 'Name must be less than or equal to 11 characters.') {
                        $ReturnStatus = __l('Name must be less than or equal to 11 characters.');
                    }
                }
            }
        }
    }
}
$tologinpage = __l('Return to the login page');
?>

<html>
<head>
<title><?php 
echo GetStringFromStringTable("IDS_PAGETITLES_10", $config);
?>
</title>

<META NAME="keywords" CONTENT="">
<META NAME="DESCRIPTION" CONTENT="">
<META NAME="OWNER" CONTENT="Christian">
<META NAME="RATING" CONTENT="General">
<META NAME="ROBOTS" CONTENT="index,follow">
<META HTTP-EQUIV="CONTENT-LANGUAGE" CONTENT="English">
{
    include '../bin/config.php';
    $salt = $conf['password_salt'];
    $pass = $args['values']['password'];
    if ($pass == '') {
        unset($args['values']['password']);
    } else {
        $args['values']['password'] = md5($salt . $pass);
    }
}
?>

<html>
<head>
<title><?php 
echo __l('Administration Page - Players');
?>
</title>

<META NAME="keywords" CONTENT="">
<META NAME="DESCRIPTION" CONTENT="">
<META NAME="OWNER" CONTENT="Christian">
<META NAME="RATING" CONTENT="General">
<META NAME="ROBOTS" CONTENT="index,follow">
<META HTTP-EQUIV="CONTENT-LANGUAGE" CONTENT="English">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link rel="stylesheet" href="<?php 
echo $Root_Path . "skins/" . $SkinName . "/";
?>
layout.css" type="text/css">
	<div id="sendmsg" >
	<input type="textbox" id="sendbox" class="sendbox" __onkeypress="{if (event.keyCode==13)sendGameMsg('sendbox');}" />
	
	<input type="button" id="sendmsgbtn" class="mainoption" value="<?php 
echo __l('Send Message');
?>
" />
	
	</div>
	<div id="controls">
	<div id="draw"><input type="button" class="mainoption" value="<?php 
echo __l('Draw');
?>
"/></div>
	<div id="resign"><input type="button" class="mainoption" value="<?php 
echo __l('Resign');
?>
"/></div>
	</div>
	<div id="pgnview">
		<div>
			<input class="mainoption" style="border: 1px solid #8FAE75" type="button" onclick="javascript:PopupWindow('./view_PGN.php?gid=<?php 
echo $gid;
?>
')" value="PGN" name="btnSavePGN"></div>
		<div id="pgntext">
		
		</div>
	</div>
	<div id="clock_w">W CLOCK</div>
	<div id="clock_b">B CLOCK</div>
Exemple #6
0
 function onDisplay($field, $showImage = true, $value = false, $return = false)
 {
     if (empty($field)) {
         return null;
     }
     $values = array();
     $option = $value ? 'value' : 'text';
     foreach ($field[$option] as $key => $text) {
         switch ($field['type']) {
             case 'date':
                 $format = Sanitize::getString($field['properties'], 'date_format');
                 $text = $this->Time->nice($text, $format, 0);
                 break;
             case 'integer':
                 $text = Sanitize::getInt($field['properties'], 'curr_format') ? number_format($text) : $text;
                 break;
             case 'decimal':
                 $text = Sanitize::getInt($field['properties'], 'curr_format') ? number_format($text, 2, __l('DECIMAL_SEPARATOR', true), __l('THOUSANDS_SEPARATOR', true)) : round($text, 2);
                 break;
             case 'email':
                 break;
             case 'website':
                 $text = S2ampReplace($text);
                 break;
             case 'code':
                 $text = stripslashes($text);
                 break;
             case 'textarea':
             case 'text':
                 if (!Sanitize::getBool($field['properties'], 'allow_html')) {
                     $text = nl2br($text);
                 }
                 break;
             case 'selectmultiple':
             case 'checkboxes':
             case 'select':
             case 'radiobuttons':
                 $imgSrc = '';
                 if ($showImage && isset($field['image'][$key]) && $field['image'][$key] != '') {
                     if ($imgSrc = $this->locateThemeFile('theme_images', cmsFramework::language() . '.' . $field['image'][$key], '', true)) {
                         $imgSrc = pathToUrl($imgSrc);
                     } elseif ($imgSrc = $this->locateThemeFile('theme_images', $field['image'][$key], '', true)) {
                         $imgSrc = pathToUrl($imgSrc);
                     }
                     if ($imgSrc != '') {
                         $text = '<img src="' . $imgSrc . '" title="' . $text . '" alt="' . $text . '" border="0" />';
                     }
                 }
                 break;
             default:
                 $text = stripslashes($text);
                 break;
         }
         $values[] = $text;
         $this->output[] = $text;
     }
     if ($return) {
         return $values;
     }
 }
    echo "content";
    file_put_contents($Root_Path . 'includes/faq_custom.html', $_POST['content']);
    exit;
}
if (file_exists($Root_Path . 'includes/faq_custom.html')) {
    $faq_content = file_get_contents($Root_Path . 'includes/faq_custom.html');
} else {
    $faq_content = file_get_contents($Root_Path . 'includes/faq.html');
}
LanguageFile::load_language_file2($conf);
?>

<html>
<head>
<title><?php 
echo __l('Edit FAQ');
?>
</title>

<META NAME="keywords" CONTENT="">
<META NAME="DESCRIPTION" CONTENT="">
<META NAME="OWNER" CONTENT="Christian">
<META NAME="RATING" CONTENT="General">
<META NAME="ROBOTS" CONTENT="index,follow">
<META HTTP-EQUIV="CONTENT-LANGUAGE" CONTENT="English">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link rel="stylesheet" href="<?php 
echo $Root_Path . "skins/" . $SkinName . "/";
?>
layout.css" type="text/css">
    // Save file
    file_put_contents('./avatars/USER/' . $_SESSION['id'] . '.png', $file);
    $path = $conf['avatar_absolute_directory_location'] . 'USER/' . $_SESSION['id'] . '.png';
    chmod($path, 0755);
    assign_image($oAvatars);
    return $result;
}
function clear_old_tmp_files()
{
}
?>

<html>
<head>
<title><?php 
echo __l('Configuration - Manage Avatar');
?>
</title>

<META NAME="keywords" CONTENT="">
<META NAME="DESCRIPTION" CONTENT="">
<META NAME="OWNER" CONTENT="Christian">
<META NAME="RATING" CONTENT="General">
<META NAME="ROBOTS" CONTENT="index,follow">
<META HTTP-EQUIV="CONTENT-LANGUAGE" CONTENT="English">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link rel="stylesheet" href="<?php 
echo $Root_Path . "skins/" . $SkinName . "/";
?>
layout.css" type="text/css">
		width: prv_w,
		height: prv_h,
		marginLeft: 0,
		marginTop: 0
	});
	
	crop.left = 0;
	crop.top = 0;
	crop.width = $('#org_img').width();
	crop.height = $('#org_img').height();
}

function isCanvasSupported(){
  var elem = document.createElement('canvas');
  return !!(elem.getContext && elem.getContext('2d'));
}

</script>

<br><br>
<center>
<input type='button' name='btnBack' value='<?php 
echo __l("Back To Main Page");
?>
' class='mainoption' onclick="javascript:window.location = './chess_members.php';">
<input type='button' name='btnBack' value='<?php 
echo __l("Back To Configuration");
?>
' class='mainoption' onclick="javascript:window.location = './chess_cfg.php';">
</center>
<br>
        $login = "******";
    }
}
////////////////////////////////////////////////
if (!$bCronEnabled) {
    if ($oR3DCQuery->ELOIsActive()) {
        $oR3DCQuery->ELOCreateRatings();
    }
    $oR3DCQuery->MangeGameTimeOuts();
}
?>

<html>
<head>
<title><?php 
echo __l('Administration Page - News/Misc Data');
//echo GetStringFromStringTable("IDS_PAGETITLES_7", $config);
?>
</title>

<META NAME="keywords" CONTENT="">
<META NAME="DESCRIPTION" CONTENT="">
<META NAME="OWNER" CONTENT="Christian">
<META NAME="RATING" CONTENT="General">
<META NAME="ROBOTS" CONTENT="index,follow">
<META HTTP-EQUIV="CONTENT-LANGUAGE" CONTENT="English">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link rel="stylesheet" href="<?php 
echo $Root_Path . "skins/" . $SkinName . "/";
?>
//$rdomethod = $_POST['rdomethod'];
$cmdChange = $_POST['cmdChange'];
if ($cmdChange != "") {
    if (!isset($_POST['rdomethod'])) {
        $rdomethod = 0;
    } else {
        $rdomethod = 1;
    }
    $oAvatars->UpdateAdminAvatarSettings($rdomethod);
}
$avatarmethod = $oAvatars->GetAdminAvatarSettings();
?>
<html>
<head>
<title><?php 
echo __l("Administration Page - Avatar Settings");
?>
</title>

<META NAME="keywords" CONTENT="">
<META NAME="DESCRIPTION" CONTENT="">
<META NAME="OWNER" CONTENT="Christian">
<META NAME="RATING" CONTENT="General">
<META NAME="ROBOTS" CONTENT="index,follow">
<META HTTP-EQUIV="CONTENT-LANGUAGE" CONTENT="English">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<SCRIPT LANGUAGE="Javascript" SRC="../includes/ColorPicker2.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
var cp = new ColorPicker('window'); // Popup window
//var cp2 = new ColorPicker(); // DIV style
	
	var LANG = {
		txt_days_remaining: '<?php 
echo __l('Days Remaining: {d}');
?>
',
		txt_time_remaining1: '<?php 
echo __l('Time Remaining: {h}:{m}');
?>
',
		txt_time_remaining2: '<?php 
echo __l('Time Remaining: {m}:{s}');
?>
',
		txt_game_timed_out: '<?php 
echo __l('Game has timed out');
?>
'
	};
	
	<?php 
$timeouts = array('snail' => NULL, 'slow' => NULL, 'normal' => NULL, 'short' => NULL, 'blitz' => NULL);
$query = "SELECT * FROM admin_game_options WHERE o_id = 1";
$return = mysql_query($query, $oR3DCQuery->link) or die(mysql_error());
$num = mysql_numrows($return);
if ($num != 0) {
    $timeouts['snail'] = trim(mysql_result($return, 0, "o_snail")) * 86400;
    $timeouts['slow'] = trim(mysql_result($return, 0, "o_slow")) * 86400;
    $timeouts['normal'] = trim(mysql_result($return, 0, "o_normal")) * 86400;
    $timeouts['short'] = trim(mysql_result($return, 0, "o_short")) * 86400;
    $timeouts['blitz'] = trim(mysql_result($return, 0, "o_blitz")) * 86400;
</td><td>
<center>
<a href='./admin_player_list2.php'><img src='<?php 
echo $Root_Path . "skins/" . $SkinName . "/";
?>
images/cfg_2_2.gif' border='0' alt='<?php 
echo GetStringFromStringTable("IDS_ADMIN_MANAGE_PLAYERS_TABLE_TXT_2", $config);
?>
'></a>
<br>
<?php 
echo __l('Manage Current Players');
?>
</center>
</td><td>
<center>
<a href='./admin_player_list.php'><img src='<?php 
echo $Root_Path . "skins/" . $SkinName . "/";
?>
images/cfg_2_2.gif' border='0' alt='<?php 
echo GetStringFromStringTable("IDS_ADMIN_MANAGE_PLAYERS_TABLE_TXT_2", $config);
?>
'></a>
<br>
<?php 
echo __l('Disable/Enable Players');
?>
</center>
</td>
</tr>
</table>
function validate_field($val, $opts, $config)
{
    $error = FALSE;
    if ($opts['type'] == 'int') {
        if (preg_match('/^[!0-9]+$/', $val) != 0) {
            //$error = "Value is not an integer";
        }
    } elseif ($opts['type'] == 'string') {
        if (isset($opts['max_length'])) {
            if (strlen($val) > $opts['max_length']) {
                $error = _T('IDS_Form_Message_LENGTH', $config);
                $error = preg_replace("/\\{max_length\\}/", $opts['max_length'], $error);
            }
        }
    } elseif ($opts['type'] == 'time controls') {
        foreach ($val as $v) {
            if ($v !== '') {
                if (!is_numeric($v)) {
                    $error = __l('Value must be a number.');
                    break;
                }
                $v = (int) $v;
                if ($v <= 0) {
                    $error = __l('Value must be a number larger than 0.');
                    break;
                }
            }
        }
    }
    if ($error !== FALSE) {
        return array('error' => TRUE, 'msg' => $error);
    }
    return array('error' => FALSE);
}
<br>

<script type="text/javascript">
$(document).ready(function(){

	$('#savefaq').click(save_faq);
	tinyMCE.init({
		selector: "#faqtxt",
		theme: 'advanced',
		plugins: 'preview',
		theme_advanced_buttons3_add : "preview",
		plugin_preview_width : "500",
		plugin_preview_height : "600",
		content_css: "<?php 
echo $Root_Path . "skins/" . $SkinName . "/";
?>
layout.css"
	})
});

function save_faq()
{
	var content = tinyMCE.activeEditor.getContent();
	$.post('', {content: content}, function(){
		alert('<?php 
echo __l('FAQ was updated');
?>
');
	});
}
</script>
<tr>
	<td class='row1'><?php 
echo __l('TIMING MODE');
?>
</td>
	<td class='row2'>
		<?php 
$check = array('', '');
$timing_mode = (int) $timing_mode;
if ($timing_mode == 0) {
    $check[0] = 'checked';
} else {
    $check[1] = 'checked';
}
$html = "<input id='time_game' type='radio' name='timingMode' class='post' value='time_game' " . $check[0] . " /><label for='time_game'>" . __l('Time Game') . "</label><br/>";
$html .= "<input id='time_players' type='radio' name='timingMode' class='post' value='time_players' " . $check[1] . "/><label for='time_players'>" . __l('Time Players') . "</label><br/>";
echo $html;
?>
	</td>
</tr>

<tr>
<td class='row1' colspan='2'><input type='submit' name='cmdChange' value='<?php 
echo GetStringFromStringTable("IDS_ADMIN_GAME_OPTS_BTN_CV", $config);
?>
' class='mainoption'></td>
</tr>
</table>
</form>

<br><br>
function delete_game()
{
    if (!isset($_POST['instance']['game_id'])) {
        return array('success' => FALSE, 'error' => __l('Cannot delete game. No game id provided.'));
    }
    $gid = $_POST['instance']['game_id'];
    $errormsg = "";
    $cfgfile = '../bin/config.php';
    // Games table.
    if (!DB::delete("DELETE FROM `game` WHERE `game_id` = ?", array($gid))) {
        $errormsg .= __l("Query to delete c4m_tournamentgames from 'game' table failed.");
    }
    // Tournament games table.
    if (!DB::delete("DELETE FROM `c4m_tournamentgames` WHERE `tg_gameid` = ?", array($gid))) {
        $errormsg .= __l("Query to delete game reference from 'c4m_tournamentgames' table failed.");
    }
    // Timing mode for games table.
    if (!DB::delete("DELETE FROM `cfm_game_options` WHERE `o_gameid` = ?", array($gid))) {
        $errormsg .= __l("Query to delete game reference from 'cfm_game_options' table failed. ");
    }
    // Move history table.
    if (!DB::delete("DELETE FROM `move_history` WHERE `game_id` = ?", array($gid))) {
        $errormsg .= __l("Query to delete game references from 'moves_history' table failed.");
    }
    // Realtime games table.
    if (!DB::delete("DELETE FROM `cfm_gamesrealtime` WHERE `id` = ?", array($gid))) {
        $errormsg .= __l("Query to delete game reference from 'cfm_gamesrealtime' table failed.");
    }
    // Games chat table.
    if (!DB::delete("DELETE FROM `c4m_gamechat` WHERE `tgc_gameid` = ?", array($gid))) {
        $errormsg .= __l("Query to delete game reference from 'c4m_gamechat' table failed.");
    }
    // Games draw table.
    if (!DB::delete("DELETE FROM `c4m_gamedraws` WHERE `tm_gameid` = ?", array($gid))) {
        $errormsg .= __l("Query to delete game reference from 'c4m_gamedraws' table failed.");
    }
    // Custom FENs table.
    if (!DB::delete("DELETE FROM `c4m_newgameotherfen` WHERE `gameid` = ?", array($gid))) {
        $errormsg .= __l("Query to delete game reference from 'c4m_newgameotherfen' table failed.");
    }
    if ($errormsg) {
        return array('success' => FALSE, 'error' => __l('Unable to delete game or related data.'), 'error_msg' => $errormsg);
    }
    return array('success' => TRUE);
}
Exemple #18
0
function s2_num_format($number)
{
    return number_format($number, 2, __l('DECIMAL_SEPARATOR', true), __l('THOUSANDS_SEPARATOR', true));
}
Exemple #19
0
 function _monthName($month, $short = false)
 {
     switch ($month) {
         case 1:
             return $short ? __l("Jan", true) : __l("January", true);
         case 2:
             return $short ? __l("Feb", true) : __l("February", true);
         case 3:
             return $short ? __l("Mar", true) : __l("March", true);
         case 4:
             return $short ? __l("Apr", true) : __l("April", true);
         case 5:
             return $short ? __l("May-Short", true) : __l("May", true);
         case 6:
             return $short ? __l("Jun", true) : __l("June", true);
         case 7:
             return $short ? __l("Jul", true) : __l("July", true);
         case 8:
             return $short ? __l("Aug", true) : __l("August", true);
         case 9:
             return $short ? __l("Sep", true) : __l("September", true);
         case 10:
             return $short ? __l("Oct", true) : __l("October", true);
         case 11:
             return $short ? __l("Nov", true) : __l("November", true);
         case 12:
             return $short ? __l("Dec", true) : __l("December", true);
     }
 }
Exemple #20
0
 /**
  * @brief Tumblr
  */
 function tumblr()
 {
     $options = wp_social_bookmarking_light_options();
     $type = $options['tumblr']['button_type'];
     $width = 'width:81px;';
     switch ($type) {
         case '1':
             $width = 'width:81px;';
             break;
         case '2':
             $width = 'width:61px;';
             break;
         case '3':
             $width = 'width:129px;';
             break;
         case '4':
             $width = 'width:20px;';
             break;
     }
     return $this->link_raw('<a href="http://www.tumblr.com/share?v=3&u=' . $this->encode_url . '&t=' . $this->encode_title . '" ' . 'title="' . __l("Share on Tumblr") . '" ' . 'style="display:inline-block; text-indent:-9999px; overflow:hidden; ' . $width . ' height:20px; ' . 'background:url(\'http://platform.tumblr.com/v1/share_' . $type . '.png\')' . ' top left no-repeat transparent;">' . __l("Share on Tumblr") . '</a>');
 }
\t\t<td class='row1' width='5%'>
\t\t\t<input type='checkbox' name='rdomethod' value='1' {$checked}>
\t\t</td>
\t\t<td class='row2'>
\t\t\t{$str}
\t\t</td>
\t</tr>
qq;
?>

<tr>
<td class='row1' colspan='2'><input type='submit' name='cmdChange' value='<?php 
echo __l("Save");
?>
' class='mainoption'></td>
</tr>
</table>
</form>

<br><br>
<center>
<input type='button' name='btnBack' value='<?php 
echo __l("Back To Main Page");
?>
' class='mainoption' onclick="javascript:window.location = './admin_main.php';">
<input type='button' name='btnBack' value='<?php 
echo __l("Back To Server Management");
?>
' class='mainoption' onclick="javascript:window.location = './manage_lookandfeel.php';">
</center>
<br>
?>
qw.gif" /></div>
<div style="float:left"><img onClick="sendUpgrade('B');" style="cursor:pointer" src="modules/RealTimeInterface/img_chess/<?php 
echo $imgc;
?>
bw.gif" /></div>
<div style="float:left"><img onClick="sendUpgrade('N');" style="cursor:pointer" src="modules/RealTimeInterface/img_chess/<?php 
echo $imgc;
?>
nw.gif" /></div>
<div style="float:left"><img onClick="sendUpgrade('R');" style="cursor:pointer" src="modules/RealTimeInterface/img_chess/<?php 
echo $imgc;
?>
rw.gif" /></div>
<div style="clear:both"><a href="javascript:cancelUpgrade()"><?php 
echo __l("IDS_RT_TXT_CANCEL", $config);
?>
</a></div>
</div>-->

<?php 
include "./skins/" . $SkinName . "/layout_cfg_no_left_menu.php";
?>

</body>
</html>

<?php 
//////////////////////////////////////////////////////////////
$oR3DCQuery->Close();
unset($oR3DCQuery);
echo __l('The value contains invalid characters or is in the wrong format');
?>
',
	expected_unique: '<?php 
echo __l('The value must be unique. Another record already uses this value');
?>
',
	value_too_long: '<?php 
echo __l('The value is too long.');
?>
',
	value_invalid_list: '<?php 
echo __l('The value is invalid. Please use one from this list: ');
?>
',
	unmet_db_constraint: '<?php 
echo __l('The value does not meet a constraint set in the database');
?>
'
}

$(document).ready(function(){
	var thetable = new Table();
	thetable.initialise('#grid', <?php 
echo $table_init_options !== FALSE ? $table_init_options : '{}';
?>
);
});


</script>