Example #1
0
function LogInfo($msg, $progress = false)
{
    global $quiet, $showHeader;
    if ($showHeader) {
        ShowHeader();
        $showHeader = false;
    }
    if (!$quiet) {
        PrintLine($msg, $progress);
    }
}
Example #2
0
<?php

function ShowHeader($header)
{
    $len = strlen($header);
    $width = (int) ((80 - $len) / 2) + $len;
    $format = "\n%" . $width . "s\n\n";
    printf($format, $header);
}
ShowHeader("KSV MyVideoTV Downloader");
/* Open the cipher */
$td = mcrypt_module_open('arcfour', '', 'stream', '');
$iv = "";
/* Create key */
$id = $argv[1];
$key = md5("c8407a08b3c71ea418ec9dc662f2a56e40cbd6d5a114aa50fb1e1079e17f2b83" . md5($id));
/* Intialize encryption */
mcrypt_generic_init($td, $key, $iv);
/* Encrypted data */
$enc_xml = file_get_contents("http://www.myvideo.de/dynamic/get_player_video_xml.php?ID={$id}&flash_playertype=D&autorun=yes");
$enc_xml = explode("=", $enc_xml, 2);
$enc_xml = $enc_xml[1];
$encrypted = pack("H*", $enc_xml);
/* Decrypt encrypted string */
$decrypted = mdecrypt_generic($td, $encrypted);
/* Terminate decryption handle and close module */
mcrypt_generic_deinit($td);
mcrypt_module_close($td);
/* Show info */
$xml = simplexml_load_string($decrypted);
$video_params = $xml->{"playlist"}->{"videos"}->{"video"}->attributes();
Example #3
0
function MessageBox($message, $links = array(), $helpid = '')
{
    SetNoUseCache();
    global $cfg, $color, $str;
    $urls = array();
    if (count($links) == 0) {
        $urls[0] = array($str['go_back'], 'JavaScript:history.back(-1)');
    } else {
        foreach ($links as $lnk) {
            $u = "{$lnk['1']}.php";
            $flag = false;
            foreach ($lnk as $k => $v) {
                if (!is_string($k)) {
                    continue;
                }
                if ($flag) {
                    $u .= "&{$k}={$v}";
                } else {
                    $u .= "?{$k}={$v}";
                    $flag = true;
                }
            }
            $urls[] = array($lnk[0], $u);
        }
    }
    $fixurl = '';
    foreach ($urls as $url) {
        $fixurl .= "[<a href=\"{$url['1']}\">{$url['0']}</a>]<br />";
    }
    $helplink = $helpid == '' ? '' : "[<a href=\"help.html#{$helpid}\" target=\"_blank\" >{$str['help']}</a>]";
    ShowHeader('<img src="./images/info.gif" /> ' . $str['general_msg'], $urls[0][1]);
    eval('echo "' . LoadTemplate('msgbox') . '";');
    ShowFooter();
}
Example #4
0
<?php

require_once './include/common.php';
if (!isset($_GET['action']) || !in_array($_GET['action'], array('show', 'login', 'logout'))) {
    ErrorBox($str['act_err']);
}
switch ($_GET['action']) {
    case 'show':
        ShowHeader("<img src=\"./images/stan0.gif\" /> 用户登陆");
        eval('echo "' . LoadTemplate('login_form') . '";');
        ShowFooter();
        break;
    case 'login':
        if (!isset($_POST['log_name'], $_POST['log_pass'])) {
            ErrorBox($str['act_err']);
        }
        $log_pass = $_POST['log_pass'];
        $log_name = trim($_POST['log_name']);
        //删除旧的在线记录
        $sql = "DELETE FROM {$cfg['tb_onlines']} WHERE o_time<={$o_deadline} OR o_time>'" . time() . "'";
        RenDB_Query($sql, true);
        $row['u_id'] = 0;
        $sql = "SELECT u_id,ban_before FROM {$cfg['tb_members']} WHERE u_name='{$log_name}' AND u_pass=MD5('{$log_pass}') LIMIT 1";
        $result = RenDB_Query($sql);
        if (RenDB_Num_Rows($result)) {
            $row = RenDB_Fetch_Array($result);
        }
        if (!$row['u_id']) {
            WriteBBLog("密码错误 IP:{$userip} 用户名:'{$log_name}'", 'wrongpass');
            MessageBox('账号或密码无效');
        }
Example #5
0
    $url = $cli->getParam('url');
    $filename = $url;
    ShowChannel($url, $filename);
} else {
    $html = $cc->get("http://playtv.fr/television/");
    preg_match_all('/<a.*?data-channel="([^"]+).*?data-playerid="([^"]+)[^>]+>/i', $html, $links);
    for ($i = 0; $i < count($links[1]); $i++) {
        $ChannelList[$links[1][$i]] = $links[2][$i];
    }
    uksort($ChannelList, 'ci_uksort');
    $FirstRun = true;
    $KeepRunning = true;
    while ($KeepRunning) {
        if ($FirstRun) {
            $FirstRun = false;
        } else {
            ShowHeader($header);
        }
        Display($ChannelList, $ChannelFormat, 3);
        echo "Enter Channel Number : ";
        $channel = trim(fgets(STDIN));
        if (is_numeric($channel) && $channel >= 1 && $channel <= count($ChannelList)) {
            $url = $ChannelList[KeyName($ChannelList, $channel - 1)];
            $filename = KeyName($ChannelList, $channel - 1);
            ShowChannel($url, $filename);
        } else {
            $KeepRunning = false;
        }
    }
}
Close("Finished");
Example #6
0
function PrintLine($msg, $progress = false)
{
    global $showHeader;
    if ($showHeader) {
        ShowHeader();
        $showHeader = false;
    }
    if ($msg) {
        printf("\r%-79s\r", "");
        if ($progress) {
            printf("%s\r", $msg);
        } else {
            printf("%s\n", $msg);
        }
    } else {
        printf("\n");
    }
}
Example #7
0
$m_website = $mdata['u_website'] == '' ? '无' : "<a href=\"{$mdata['u_website']}\" target=\"_blank\">{$mdata['u_website']}</a>";
$m_avatar = MakeBBAvatar($mdata['u_avatar']);
//$m_grade= MakeBBGrade($mdata);
$m_tout = GetBBTout($mdata) . '%';
$m_rate = $mdata['g_w'] + $mdata['g_d'] + $mdata['g_l'] == 0 ? 0 : round($mdata['g_w'] * 100 / ($mdata['g_w'] + $mdata['g_d'] + $mdata['g_l']), 1);
$m_rate .= '%';
$mdata['reg_date'] = TimeToDate($mdata['reg_date']);
$mdata['last_visit'] = TimeToDate($mdata['last_visit']);
$buttons = '';
$encodename = urlencode($mdata['u_name']);
if ($udata['is_member'] && !IsSameName($name, $udata['u_name'])) {
    $buttons .= MakeBBButton("room_new.php?byname={$encodename}", '搜索新局');
    $buttons .= MakeBBButton("g_search.php?action=list&search_all_user=0&u_name={$encodename}", '搜索棋局');
    $buttons .= MakeBBButton("pm_new.php?action=new1&sendto={$encodename}", '发送消息', 500, 220);
    $buttons .= MakeBBButton("pm_new.php?action=invite1&sendto={$encodename}", '邀请下棋', 500, 220);
    if (!In_Names($mdata['u_name'], $udata['friends'])) {
        $buttons .= MakeBBButton("m_fb.php?action=f_add&tname={$encodename}", '加为好友');
    }
    if (!In_Names($mdata['u_name'], $udata['blacklist'])) {
        $buttons .= MakeBBButton("m_fb.php?action=b_add&tname={$encodename}", '加入黑名单');
    }
}
$m_rec = "{$mdata['g_w']}胜{$mdata['g_d']}平{$mdata['g_l']}负";
if ($mdata['u_bio'] == '') {
    $mdata['u_bio'] = '(空)';
} else {
    $mdata['u_bio'] = BBCoding($mdata['u_bio']);
}
ShowHeader('会员信息');
eval('echo "' . LoadTemplate('m_view') . '";');
ShowFooter();
        switch ($gdata['host_color']) {
            case 0:
                $gcolor = '<img src="./images/white.gif">';
                break;
            case 1:
                $gcolor = '<img src="./images/black.gif">';
                break;
            default:
                $gcolor = '随机';
        }
        $skillmin = $udata['skill'] - $gdata['skill_range'];
        $skillmax = $udata['skill'] + $gdata['skill_range'];
        $greq = $gdata['skill_range'] == -1 ? '' : "({$skillmin}-{$skillmax}) ";
        $greq .= $gdata['tout_max'] >= 100 ? '' : "{$gdata['tout_max']}%";
        if ($greq == '') {
            $greq = '-';
        }
        $gtimelimit = Time2HMS($gdata['add_time']);
        if ($gdata['step_time']) {
            $gtimelimit .= '<br />' . Time2HMS($gdata['step_time']);
        }
        eval("\$nglist .= \"{$game_cell} \";");
        $gnum++;
    }
}
if ($gnum == 0) {
    $nglist = "<tr bgcolor=\"{$color['cell']}\"><td colspan=\"8\">(空)</td></tr>";
}
ShowHeader('<img src="./images/renju_new.gif" /> 我的新桌');
eval('echo "' . LoadTemplate('room_mynew') . '";');
ShowFooter();
    case 5:
        $order = 'g_d DESC';
        $lks[5] = HLTxt('Draw');
        break;
    case 6:
        $order = 'g_l DESC';
        $lks[6] = HLTxt('Lost');
        break;
    default:
        $order = 'points DESC';
        $lks[0] = HLTxt('Pts');
        break;
}
$sql = "SELECT * FROM `{$cfg['tb_players']}` WHERE group_id='{$group_id}' ORDER BY {$order}";
$result = RenDB_Query($sql);
$pllist = '';
$plnum = 0;
if (RenDB_Num_Rows($result) > 0) {
    $pl_cell = LoadTemplate('player_cell');
    while ($pldata = RenDB_Fetch_Array($result)) {
        $plnum++;
        $u_name = MemberLink($pldata['u_name']);
        eval("\$pllist.=\"{$pl_cell}\";");
    }
} else {
    $pllist = "<tr bgcolor=\"{$color['cell']}\"><td clospan=\"5\">({$str['empty']})</td></tr>";
}
//echo sprintf ( "%01.3f" , GetMicrotime() - $mt0 );
ShowHeader($str['cp_view']);
eval('echo "' . LoadTemplate('group_view') . '";');
ShowFooter();
Example #10
0
}
foreach ($boards as $k => $sty) {
    if ($boardstyle != $k) {
        $board_options .= "<option value=\"{$k}\">{$sty['name']}</option>";
    }
}
//$thismode='g_view.php';
//$mtsign=$ismyturn?HLTxt('轮到你走'):'';
/*
	ShowHeader("<img src=\"./images/renju.gif\" /> 第{$gid}桌 $mtsign","g_view.php?gid=$gid",$cfg['span_refresh_game']);
else */
//自动刷新
//if($cfg['span_refresh_game']>0 && $nowtime-$gdata['l_time']<3600 && IsSameName($udata['u_name'],$names[1-$turnside]))
//	$frame_auto="<iframe frameborder=\"0\" width=\"0\" height=\"0\" src=\"auto_refresh.php?gid=$gid\"></iframe>";
//else $frame_auto='';
ShowHeader("<img src=\"./images/renju.gif\" /> 第{$gid}桌");
//公有数据
$checkcode = $udata['act_check'];
//$codeinfo="{$names[1]} vs {$names[0]}";
$moves = '';
for ($i = 0; $i < $mcount; $i++) {
    $pos = ord($gdata['moves'][$i]);
    $moves .= chr(intval(($pos - 1) % 15) + 65);
    $moves .= chr(($pos - 1) / 15 + 65);
}
$canmove = $ismyturn ? '1' : '0';
//内建棋盘
if ($boardstyle != 'java') {
    $sitewidth = $boards[$boardstyle]['width'];
    $boardwidth = $sitewidth * 17;
    $rmdir = './renju/' . $boards[$boardstyle]['id'];
Example #11
0
        $lks[0] = HLTxt('积分');
        break;
}
//上榜人数
$sql = "SELECT COUNT(*) FROM {$cfg['tb_members']}";
$result = RenDB_Query($sql);
$row = RenDB_Fetch_Row($result);
$pageinfo = MakePageBar("ranking.php?orderby={$orderby}", $row[0], $cfg['mperpage'], $page);
$sql = "SELECT * FROM {$cfg['tb_members']} ORDER BY {$order} LIMIT {$pageinfo['start']},{$cfg['mperpage']}";
$result = RenDB_Query($sql);
$mlist = '';
$mnum = 0;
if (RenDB_Num_Rows($result) > 0) {
    $member_cell = LoadTemplate('m_cell');
    while ($mdata = RenDB_Fetch_Array($result)) {
        $morder = $pageinfo['start'] + $mnum + 1;
        $mname = MemberLink($mdata['u_name']);
        $mgrade = $mdata['skill'];
        $mrate = $mdata['g_w'] + $mdata['g_d'] + $mdata['g_l'] == 0 ? 0 : round($mdata['g_w'] * 100 / ($mdata['g_w'] + $mdata['g_d'] + $mdata['g_l']), 1);
        $mrate .= '%';
        $minfo = "{$mdata['g_w']}胜{$mdata['g_d']}平{$mdata['g_l']}负";
        $mregtime = TimeToDate($mdata['reg_date']);
        eval("\$mlist .= \"{$member_cell}\";");
        $mnum++;
    }
} else {
    $glist = "<tr><td colspan=\"7\">(空)</td></tr>";
}
ShowHeader('<img src="./images/ranking.gif" /> 用户排名');
eval('echo "' . LoadTemplate("ranking") . '";');
ShowFooter();
Example #12
0
    }
    if (!$first) {
        $onlines .= ', ';
    }
    $onlines .= MemberLink($row['fake_name']);
    $first = false;
}
if ($guestcount > 0) {
    if (!$first) {
        $onlines .= ', ';
    }
    $onlines .= "Guest x {$guestcount}</td>";
}
//删除旧的在线记录
$sql = "DELETE FROM {$cfg['tb_onlines']} WHERE o_time<={$o_deadline} OR o_time>'" . time() . "'";
RenDB_Query($sql, true);
//在线纪录
require_once './cache/onlinerec.php';
if ($onlcount > $maxonline[0]) {
    $maxonline[0] = $onlcount;
    $buf = "<?php \$maxonline=array({$onlcount},{$nowtime}); ?>";
    $fr = @fopen('./cache/onlinerec.php', 'w');
    @flock($fr, LOCK_EX);
    @fwrite($fr, $buf);
    @fclose($fr);
    WriteBBLog("在线人数记录: {$onlcount}");
}
$maxonline[1] = TimeToDate($maxonline[1]);
ShowHeader('<img src="./images/home.gif" /> ' . $str['main_page']);
eval('echo "' . LoadTemplate('main') . '";');
ShowFooter();
Example #13
0
<?php

require_once './include/common.php';
ShowHeader('<img src="./images/help.gif" /> 帮助文档');
eval("echo \"" . LoadTemplate("help") . "\";");
ShowFooter();
Example #14
0
    ?>
	<div class="sg-like hidden" id="extra-sg-like">
		<br />
		<div class="title big caps space">Suggestions I Like</div>
		<div id="sg-like"></div>
	</div>
<?php 
}
require_once __DIR__ . "/theme-slaughter.php";
require_once __DIR__ . "/theme-voting.php";
require_once __DIR__ . "/theme-announcement.php";
require_once __DIR__ . "/theme-admin.php";
require_once __DIR__ . "/theme-dialog.php";
template_GetPageHeader();
dialog_InsertCode();
ShowHeader();
if (!empty($CONFIG['theme-alert'])) {
    echo "<div class='alert'>", $CONFIG['theme-alert'], "</div>";
}
if (isset($GLOBALS['ERROR'])) {
    echo "<div class='alert'>", $GLOBALS['ERROR'], "</div>";
}
dialog_InsertScript();
?>
<script>
<?php 
if ($cookie_id === 0 && isset($GLOBALS['ERROR'])) {
    ?>
		legacy_DoLogout();
<?php 
}
Example #15
0
     if ($row[0] >= $cfg['maxnewgame']) {
         MessageBox("您的新桌已经到了上限({$cfg['maxnewgame']})");
     }
     /*
     	$sql="SELECT COUNT(*) FROM $cfg[tb_games] WHERE b_name='$udata[u_name]' OR w_name='$udata[u_name]'";
     	$result = RenDB_Query($sql);
     	$row = RenDB_Fetch_Row( $result );
     	echo $row[0];
     	if( $row[0] >= $cfg['maxgame'] ) MessageBox("您进行中的的棋局已经到了上限($cfg[maxgame])");
     */
     $greate = $cfg['maxnewgame'] - $row[0];
     $gnumoption = '';
     for ($i = 2; $i <= $greate; $i++) {
         $gnumoption .= "<option value={$i}>{$i}</option>";
     }
     ShowHeader('<img src="./images/renju_new.gif" /> 创建新局');
     eval("echo \"" . LoadTemplate("g_form") . "\";");
     ShowFooter();
     break;
 case 'new2':
     if (!isset($timeadd, $timestep, $skill_range, $rules, $gcreate, $maxtout, $hostcolor)) {
         ErrorBox($str['act_err']);
     }
     $sql = "SELECT COUNT(*) FROM {$cfg['tb_newgames']} WHERE host_name='{$udata['u_name']}'";
     $result = RenDB_Query($sql);
     $row = RenDB_Fetch_Row($result);
     if ($row[0] >= $cfg['maxnewgame']) {
         MessageBox("您的新桌已经到了上限({$cfg['maxnewgame']})");
     }
     /*	$sql="SELECT COUNT(*) FROM $cfg[tb_games] WHERE b_name='$udata[u_name]' OR w_name='$udata[u_name]'";
     	$result = RenDB_Query($sql);
Example #16
0
            $pmfrom .= ' (' . HLTxt('系统消息') . ')';
            $message = BBCoding($pmdata['message'], true);
        } else {
            $pmfrom = $outbox ? 'To:' . MemberLink($pmdata['sendto']) : 'From:' . MemberLink($pmdata['comefrom']);
            $message = BBCoding($pmdata['message'], false);
        }
        //if( $pmnum > $cfg['maxpm']  )
        //	$message = "<del>$message</del>";
        eval("\$pmlist .= \"{$pm_cell} \";");
    }
    /*
    	if( $pmnum > $cfg['maxpm'] )
    	{
    		$sql ="DELETE FROM {$cfg['tb_pms']} WHERE sendto='{$udata['u_name']}' AND pmid<'{$endid}'";
    		RenDB_Query($sql,true) ;
    	}*/
}
if ($pmnum == 0) {
    $pmlist = "<tr bgcolor=\"{$color['cell']}\"><td>(空)</td></tr>";
}
$pmnew = MakeBBButton('pm_new.php?&action=new1', '发消息', 550, 250);
if ($udata['have_new_pm']) {
    $sql = "UPDATE {$cfg['tb_pms']} SET `isnew` = 0 WHERE `sendto`='{$udata['u_name']}'";
    RenDB_Query($sql, true);
    $sql = "UPDATE {$cfg['tb_members']} SET have_new_pm=0 WHERE u_name='{$udata['u_name']}' LIMIT 1";
    RenDB_Query($sql, true);
    $udata['have_new_pm'] = 0;
}
ShowHeader('<img src="./images/pm.gif" /> 我的消息');
eval("echo \"" . LoadTemplate("pm_view") . "\";");
ShowFooter();
Example #17
0
function main()
{
    global $hlpfile, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '<h3>' . adm_translate("Petite Lettre D'information") . '</h3>';
    echo "\n   <a href=\"admin.php?op=lnl_List\" class=\"noir\">" . adm_translate("Liste des LNL envoyées") . "</a>\n   <a href=\"admin.php?op=lnl_User_List\" class=\"noir\">" . adm_translate("Afficher la liste des prospects") . "</a>";
    echo '<h4>' . adm_translate("Message d'entête") . '</h4><a href="admin.php?op=lnl_Add_Header" class="noir">' . adm_translate("Ajouter un article") . '</a>';
    ShowHeader();
    echo '<h4>' . adm_translate("Corps de message") . '</h4><a href="admin.php?op=lnl_Add_Body" class="noir">' . adm_translate("Ajouter un article") . '</a>';
    ShowBody();
    echo '<h4>' . adm_translate("Message de pied de page") . '</h4><a href="admin.php?op=lnl_Add_Footer" class="noir">' . adm_translate("Ajouter un article") . '</a>';
    ShowFooter();
    echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"header\">\n";
    echo adm_translate("Assembler une lettre et la tester");
    echo "</td></tr></table>\n";
    echo "<form action=\"admin.php\" method=\"post\">";
    echo "<p align=\"center\">" . adm_translate("Entête") . " : <input class=\"textbox_standard\" type=\"text\" name=\"Xheader\" size=\"12\" max=\"11\" />&nbsp;" . adm_translate("Corps") . " : <input class=\"textbox_standard\" type=\"text\" name=\"Xbody\" size=\"12\" max=\"11\" />";
    echo "&nbsp;" . adm_translate("Pied") . " : <input class=\"textbox_standard\" type=\"text\" name=\"Xfooter\" size=\"12\" max=\"11\" />";
    echo "<input type=\"hidden\" name=\"op\" value=\"lnl_Test\" />";
    echo " - <input class=\"bouton_standard\" type=\"submit\" value=\"" . adm_translate("Valider") . "\" /></p>";
    echo "</form></td></tr>";
    echo "<tr>";
    echo "<td>";
    echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"header\">\n";
    echo adm_translate("Envoyer La Lettre");
    echo "</td></tr></table>\n";
    echo '<form action="admin.php" method="post">';
    echo adm_translate("Entête") . " : <input class=\"textbox_standard\" type=\"text\" name=\"Xheader\" size=\"12\" max=\"11\" />&nbsp;" . adm_translate("Corps") . " : <input class=\"textbox_standard\" type=\"text\" name=\"Xbody\" size=\"12\" max=\"11\" />";
    echo "&nbsp;" . adm_translate("Pied") . " :&nbsp;&nbsp;<input class=\"textbox_standard\" type=\"text\" name=\"Xfooter\" size=\"12\" max=\"11\" /><br />";
    echo adm_translate("Sujet") . " :&nbsp;&nbsp;&nbsp;<input class=\"textbox_standard\" type=\"text\" size=\"80\" max=\"255\" name=\"Xsubject\" /><hr noshade=\"noshade\" class=\"ongl\" />";
    echo "<p align=\"center\"><input type=\"radio\" value=\"All\" checked=\"checked\" name=\"Xtype\" /> " . adm_translate("Tous les Utilisateurs") . " -";
    echo "<input type=\"radio\" value=\"Mbr\" name=\"Xtype\" /> " . adm_translate("Seulement aux membres") . " : ";
    // ---- Groupes
    $mX = liste_group();
    $tmp_groupe = "";
    while (list($groupe_id, $groupe_name) = each($mX)) {
        if ($groupe_id == "0") {
            $groupe_id = "";
        }
        $tmp_groupe .= "<option value=\"{$groupe_id}\" {$sel3}>{$groupe_name}</option>\n";
    }
    echo '<select class="form-control" name="Xgroupe">' . $tmp_groupe . '</select>';
    // ---- Groupes
    echo "<input type=\"radio\" value=\"Out\" name=\"Xtype\" /> " . adm_translate("Seulement aux prospects") . " - ";
    echo '
      <input type="hidden" name="op" value="lnl_Send" />
      <input class="btn btn-primary" type="submit" value="' . adm_translate("Valider") . '" />
      </form>';
    adminfoot('', '', '', '');
}
Example #18
0
	if(	RenDB_Affected_Rows() > 0 )//insert succeed
	{
		setcookie('cook_name',$udata['u_name']);
		setcookie('cook_pass',$new_pass);
			
		$lks[0] = array( '查看资料', 'm_view', 'name'=>urlencode($udata['u_name']));
		MessageBox( '更新成功' ,$lks);
	}

	MessageBox('资料并没有改变');
	break;
case 'sendpass1':
	
	if(!$cfg['send_email']) MessageBox('管理员关闭了系统邮件,目前不能使用此功能');

	ShowHeader('<img src="./images/stan0.gif" /> 取回密码');
	eval ("echo \"".LoadTemplate("sendpass_form")."\";");
	ShowFooter();
	break;
case 'sendpass2':
	SetNoUseCache();

	if(!$cfg['send_email']) ErrorBox( $str['act_err'] );
	if( !isset($u_name,$u_email))
		ErrorBox( $str['act_err'] );

	if( In_Names( $u_name,$cfg['admins']))
	{
		WriteBBLog( "试图取回管理员 {$u_name} 的密码",'wrongpass');
		ErrorBox( $str['act_err'] );
	}
Example #19
0
            $filename = substr_replace($filename, ' ', $i, 1);
        }
    }
    $filename = preg_replace('/[\\/\\\\?\\*\\:\\|\\<\\>]/i', ' - ', $filename);
    $filename = preg_replace('/\\s\\s+/i', ' ', $filename);
    $filename = trim($filename);
    return $filename;
}
function ShowHeader($header)
{
    $len = strlen($header);
    $width = (int) ((80 - $len) / 2) + $len;
    $format = "\n%" . $width . "s\n\n";
    printf($format, $header);
}
ShowHeader("KSV Power106 Downloader");
$format = "%-8s : %s\n";
if ($argc <= 2) {
    echo "Enter Channel ID : ";
    $channel_id = trim(fgets(STDIN));
    echo "Enter Asset ID   : ";
    $asset_id = trim(fgets(STDIN));
} else {
    $channel_id = $argv[1];
    $asset_id = $argv[2];
}
echo "Retrieving html . . .\n";
$xml = file_get_contents("http://player.vidaroo.com/initiate/render/channel_id/{$channel_id}/asset_id/{$asset_id}/embed_id/2105/log_embed_id/128210038");
$xml = simplexml_load_string($xml);
$token = $xml->xpath('/rsp/msg/session/token');
$token = (string) $token[0];
Example #20
0
			$this_name=MemberLink($n);
			foreach($onlines as $n2)
				if(IsSameName($n,$n2))
				{
					$this_name='<b>'.$this_name.'</b>';
					break;
				}
			$b_list.=$this_name."[<a href=\"m_fb.php?action=b_del&tname=$n\">删</a>] ";
		}
	}
	else $b_list='(空)';

	$addbox="<input type=text size=20 maxlength=12 name=\"tname\"> <input type=\"submit\" value=\"添加\">";
	$add_box_f=strlen($udata['friends']) >= $cfg['max_friends']?'您的好友列表已满': $addbox;
	$add_box_b=strlen($udata['blacklist']) >= $cfg['max_blacklist']?'您的黑名单已满': $addbox;
	ShowHeader('<img src="./images/profile.gif" /> 我的好友');
	eval ('echo "'.LoadTemplate('m_fb').'";');
	ShowFooter();
	break;
case 'f_add':
	if(!IsMember($tname)) ErrorBox('用户不存在');
	if(IsSameName($tname,$udata['u_name'])) MessageBox('不能加自己');
	if(strlen($udata['friends']) >= $cfg['max_friends']) MessageBox('您的好友列表已经满了');
	if(In_Names($tname,$udata['friends'])) MessageBox('该用户已经在好友列表中了');
	
	if(In_Names($tname,$udata['blacklist']))
	{
		//从黑名单中删除
		$blacklist=explode('|',$udata['blacklist']);
		foreach($blacklist as $k=>$n)
		{
Example #21
0
                    }
                    $gblack = '<a href="m_view.php?&name=' . urlencode($gdata['b_name']) . "\">{$gblack}</a>";
                    $gwhite = '<a href="m_view.php?&name=' . urlencode($gdata['w_name']) . "\">{$gwhite}</a>";
                    if ($gturn == '') {
                        $gturn = '-';
                    } else {
                        $gturn = '<a href="m_view.php?&name=' . urlencode($gdata['turn_name']) . "\">{$gturn}</a>";
                    }
                    if ($turnside != -1) {
                        if ($undos[!$myside]) {
                            $gturn .= HLTxt('(悔)');
                        }
                        if ($draws[!$myside]) {
                            $gturn .= HLTxt('(和)', 1);
                        }
                    }
                    $gopening = $gdata['rules'] <= 1 ? $openingname[$gdata['opening']] : '-';
                    eval("\$glist .= \"{$game_cell} \";");
                    $gnum++;
                }
            }
            if ($gnum == 0) {
                $glist = "<tr bgcolor=\"{$color['cell']}\"><td colspan=\"8\">没找到</td></tr>";
            }
            //echo sprintf ( "%01.3f" , GetMicrotime() - $mt0 );
            ShowHeader('<img src="./images/renju.gif" /> 搜索棋局');
            eval('echo "' . LoadTemplate('g_search_result') . '";');
            ShowFooter();
        }
        break;
}
Example #22
0
<?php

function ShowHeader($header)
{
    $len = strlen($header);
    $width = (int) ((80 - $len) / 2) + $len;
    $format = "\n%" . $width . "s\n\n";
    printf($format, $header);
}
ShowHeader("KSV EugeniaVoda Downloader");
$format = "%-8s : ";
if ($argc <= 2) {
    printf($format, "URL");
    $url = trim(fgets(STDIN));
    printf($format, "Filename");
    $filename = trim(fgets(STDIN));
} else {
    $url = $argv[1];
    $filename = $argv[2];
}
echo "Retrieving data . . .\n";
$json = file_get_contents($url . "/offsets.json");
$chunks = json_decode($json);
if (!$chunks) {
    die("Failed to decode json");
}
$fh = fopen($filename, 'wb');
fwrite($fh, pack("H*", "464C5601050000000900000000"));
$total_chunks = count($chunks);
for ($i = 0; $i < $total_chunks; $i++) {
    echo "Downloading " . ($i + 1) . "/{$total_chunks} chunks\r";
Example #23
0
<?php

require_once './include/common.php';
SetNoUseCache();
if (!isset($cp_id)) {
    MessageBox($str['act_err']);
}
$cp_id = intval($cp_id);
if (!file_exists("./cpdata/{$cp_id}.html")) {
    MessageBox($str['page_not_found']);
}
ShowHeader('<img src="./images/renju.gif" /> ' . $str['cp_view']);
echo implode('', file("./cpdata/{$cp_id}.html"));
ShowFooter();