code stringlengths 1 2.01M | repo_name stringlengths 3 62 | path stringlengths 1 267 | language stringclasses 231 values | license stringclasses 13 values | size int64 1 2.01M |
|---|---|---|---|---|---|
body
{
padding: 0;
margin: 0;
font-size: 12px;
font-family: 微软雅黑, 宋体;
}
#head
{
height: 71px;
width: 826px;
margin: auto;
margin-top: 20px;
}
#logo
{
width: 185px;
height: 71px;
background-image: url('../images/resume-logo-beta.jpg');
background-repeat: no-repeat;
float: left;
}
#logo:hover
{
background-image: url('../images/resume-logo-goback.jpg');
}
#content
{
width: 686px;
margin: auto;
overflow: hidden;
border: 2px #ebebeb solid;
border-radius: 5px 5px;
padding: 10px 70px;
margin-top: 20px;
}
#basic
{
overflow: hidden;
}
#basic1
{
height: 83px;
}
#basic1 span
{
height: 83px;
line-height: 83px;
font-size: 22px;
letter-spacing: 1px;
float: left;
margin-left: 20px;
}
#basic1 img
{
height: 83px;
width: 83px;
float: left;
}
#basic2
{
height: 24px;
line-height: 24px;
}
.left
{
float: left;
}
.right
{
float: right;
}
#info
{
border-top: 1px #ebf1fe solid;
margin-top:30px;
} | 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/html/css/profile.css | CSS | gpl3 | 1,127 |
a#back
{
margin-top: 70px;
font-size: 16px;
margin-right: 50px;
}
div#content
{
border-top: 1px #b1c3d8 solid;
overflow: hidden;
}
div#content-left
{
width: 170px;
padding-top: 30px;
padding-bottom: 20px;
background-color: #ebf1fe;
}
div#content-left div
{
height: 30px;
font-family: 微软雅黑, 宋体;
line-height: 30px;
padding-left: 20px;
color: #2a6790;
}
div#content-left a
{
font-size: 20px;
}
div#content-middle
{
width: 792px;
background-color: #ebf1fe;
}
div#inner-content
{
width: 610px;
padding: 10px;
background-color: #ffffff;
border: 1px #e5eaf7 solid;
border-radius: 5px 5px;
margin-top: 10px;
line-height: 20px;
}
div#inner-content span
{
width: 100px;
text-align: right;
}
div#inner-content div
{
width: 610px;
overflow: hidden;
line-height: 30px;
}
div#inner-content input, textarea
{
border: 1px #e1ebff solid;
background-color: #f2f6fe;
width: 323px;
margin-top:7px;
}
div#inner-content a
{
width: 152px;
height: 29px;
background-image: url('../images/feedback-submit.jpg');
margin-left: 230px;
}
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/html/css/help_feedback.css | CSS | gpl3 | 1,241 |
div#manager-title
{
height: 30px;
line-height: 30px;
margin-top: 20px;
}
div#manager-title span.manager-title
{
width: 57px;
background-image: url('../images/manager-pic.jpg');
background-repeat: no-repeat;
background-position: 5px center;
height: 30px;
color: #df7902;
padding-left: 25px;
}
div#manager-title span.manager-title-tag
{
width: 116px;
background-image: url('../images/manager-title-tag.jpg');
background-repeat: no-repeat;
height: 30px;
text-align: center;
font-weight: bold;
color: #000000;
letter-spacing: 1px;
}
div#manager-content
{
background-image: url('../images/manager-content.jpg');
background-repeat: no-repeat;
padding-top: 10px;
overflow: hidden;
}
div#content-left
{
width: 164px;
padding-top: 20px;
}
div#manager-control
{
width: 164px;
height: 160px;
background-color: #ebf1fe;
}
a.manager-control
{
width: 139px;
height: 37px;
border-bottom: 1px #ccddf0 dashed;
line-height: 37px;
text-align: left;
font-size: 18px;
font-family: 微软雅黑, 宋体;
color: #3e82af;
padding-left: 25px;
}
a.manager-control-choose
{
background-image: url('../images/manager-control-background.jpg');
background-repeat: no-repeat;
}
a.publish-button
{
height: 37px;
width: 137px;
margin-top: 20px;
margin-left: 10px;
}
a#jobs-publish-button
{
background-image: url('../images/jobs-publish-button.jpg');
}
a#recruitment-publish-button
{
background-image: url('../images/recruitment-publish-button.jpg');
}
div#content-middle
{
width: 610px;
border: 1px #e5eaf7 solid;
border-top-left-radius: 3px 3px;
border-top-right-radius: 3px 3px;
border-bottom-left-radius: 3px 3px;
border-bottom-right-radius: 3px 3px;
background-color: #ffffff;
padding: 10px;
}
div#content-middle-delete
{
height: 15px;
line-height: 15px;
}
div#content-middle-delete a
{
padding: 0 0 0 20px;
background-image: url('../images/manager-conten-middle-deletet.jpg');
background-repeat: no-repeat;
}
div.item
{
width: 607px;
overflow: hidden;
margin-top: 5px;
border-bottom: 1px #dedede dashed;
padding-left: 5px;
padding-top: 5px;
padding-bottom: 5px;
}
div.item-over
{
background-image: url('../images/item-over-background.jpg');
background-repeat: no-repeat;
}
div.item-over-noclose
{
background-image: url('../images/item-over-background-noclose.jpg');
background-repeat: no-repeat;
}
div.item-delete
{
height: 17px;
}
div.item-delete a
{
width: 17px;
height: 17px;
}
div.item-pic
{
height: 50px;
width: 50px;
padding: 2px;
border: 1px #ececec solid;
background-color: #ffffff;
}
div.item-content
{
width: 530px;
}
div.item-blog
{
width: 530px;
line-height: 20px;
padding: 0 5px;
font-size: 14px;
word-wrap: break-word;
overflow: hidden;
}
a.item-blog-name
{
color: #6f93ab;
}
a.item-blog-link
{
color: #0084b4;
}
div.item-other
{
height: 24px;
line-height: 24px;
}
div.item-applys
{
margin-top: 5px;
line-height: 24px;
display: none;
}
div.item-page
{
margin-top: 5px;
line-height: 24px;
display: none;
padding: 0 5px;
}
div.item-page a
{
margin: 0 5px;
}
div.item-applys span.item-applys-time
{
margin-left: 5px;
}
div.item-applys a.item-applys-name
{
color: #7ba5d7;
}
div.item-applys a.item-applys-read
{
color: #7ba5d7;
}
div.item-applys div
{
height: 24px;
padding: 0 20px;
}
span.item-time
{
color: #a3a3a3;
padding: 0 5px;
}
a.item-time
{
color: #a3a3a3;
padding: 0 5px;
}
a.item-position
{
color: #7ba5d7;
margin: 0 10px;
}
a.item-control
{
color: #7ba5d7;
letter-spacing: 2px;
padding: 0 10px;
line-height: 14px;
height: 14px;
margin-top: 5px;
border-left: 1px #7ba5d7 solid;
}
a.last
{
border-left: none;
}
span.item-apply-name
{
color: #7ba5d7;
margin-left: 10px;
}
span.item-apply-info
{
color: #2281a4;
margin-right: 10px;
}
span.item-apply-info-read
{
color: #ea7f37;
}
a.item-favourite
{
letter-spacing: 2px;
padding: 0 10px;
line-height: 14px;
height: 14px;
margin-top: 5px;
}
a.item-action
{
color: #2281a4;
}
a.item-doapply
{
color: #ea7f37;
}
div#pages
{
height: 21px;
margin-top: 20px;
}
a.page-number
{
height: 21px;
padding: 0 6px;
line-height: 21px;
text-align: center;
border: 1px #5c738f solid;
color: #5c738f;
margin: 0 2px;
border-top-left-radius: 3px 3px;
border-top-right-radius: 3px 3px;
border-bottom-left-radius: 3px 3px;
border-bottom-right-radius: 3px 3px;
}
a.page-number-current
{
background-color: #a4c8f4;
}
a.page-control
{
height: 21px;
padding: 0 6px;
line-height: 21px;
text-align: center;
border: 1px #5c738f solid;
background-color: #a4c8f4;
color: #5c738f;
margin: 0 2px;
border-top-left-radius: 3px 3px;
border-top-right-radius: 3px 3px;
border-bottom-left-radius: 3px 3px;
border-bottom-right-radius: 3px 3px;
}
div#pages span
{
height: 21px;
line-height: 21px;
text-align: center;
}
div#content-right
{
background-color: #ebf1fe;
width: 160px;
overflow: hidden;
}
div#right-title
{
height: 40px;
line-height: 40px;
text-align: center;
letter-spacing: 2px;
color: #949494;
}
div.ad-title
{
line-height: 20px;
color: #7ba5d7;
padding: 0 10px;
letter-spacing: 1px;
padding-top: 10px;
}
div.ad-content
{
line-height: 20px;
color: #949494;
padding: 0 10px;
letter-spacing: 1px;
}
div.ad-address
{
line-height: 20px;
color: #7ba5d7;
padding: 0 10px;
letter-spacing: 1px;
padding-bottom: 10px;
}
div#blogs
{
display: none;
}
div#profile-title
{
height: 30px;
line-height: 30px;
padding: 0px 10px;
}
div#profile-title span#title
{
color: #3e82af;
font-size: 16px;
font-family: 微软雅黑, 宋体;
}
div#profile-title span#lasttime
{
color: #999999;
}
div.profile-detail-title
{
height: 47px;
background-image: url('../images/profile-title-background.jpg');
background-repeat: repeat-x;
}
div.profile-detail-title span
{
color: #585858;
margin-top: 15px;
font-size: 14px;
margin-left: 10px;
font-weight: bold;
letter-spacing: 2px;
line-height: 30px;
}
div.profile-detail-title a
{
height: 25px;
width: 82px;
line-height: 25px;
text-align: center;
background-image: url('../images/profile-title-button.jpg');
background-repeat: no-repeat;
margin-top: 15px;
margin-right: 20px;
color: #496a8a;
}
div.profile-detail-title a:hover
{
text-decoration: none;
}
div.profile-content
{
overflow: hidden;
padding: 10px 0;
}
div#info-content-left
{
width: 400px;
}
div#info-content-right
{
width: 210px;
}
span.info-content-title
{
color: #b2b2b2;
height: 30px;
line-height: 30px;
width: 150px;
text-align: right;
}
input.info-content-words
{
color: #585858;
height: 16px;
line-height: 16px;
width: 200px;
margin-left: 30px;
margin-top: 7px;
margin-bottom: 7px;
border: 1px #c9c9c9 solid;
}
input.info-content-words:hover
{
border: 1px #a8a8a8 solid;
}
input.info-content-words-focus
{
border: 1px #a8a8a8 solid;
}
div#info-pic
{
height: 94px;
width: 94px;
margin-left: 53px;
margin-top: 20px;
border: 5px #ebf1fe solid;
border-radius: 5px 5px;
}
div#info-pic div
{
line-height: 24px;
background-color: #dbeaf6;
height: 24px;
text-align: center;
}
div#info-pic-control
{
line-height: 24px;
height: 24px;
text-align: center;
margin-top: 15px;
color: #585858;
}
div#info-pic-control
{
line-height: 24px;
height: 24px;
text-align: center;
margin-top: 15px;
color: #585858;
}
div.education-item
{
height: 30px;
line-height: 30px;
color: #585858;
border-bottom: 1px #dcebf6 dashed;
}
div.education-item-over
{
background-color: #e4eff9;
}
div.education-item span.school
{
width: 100px;
margin-left: 60px;
}
div.education-item span.time
{
width: 120px;
}
div.education-item span.education
{
width: 80px;
}
div.education-item span.major
{
width: 80px;
}
div.education-header
{
color: #b2b2b2;
}
div#profile-control
{
display: none;
}
div#profile-control a
{
height: 36px;
width: 142px;
margin-top: 20px;
margin-left: 14px;
}
a#profile-preview
{
background-image: url('../images/profile-preview.jpg');
background-repeat: no-repeat;
}
a#profile-save
{
background-image: url('../images/profile-save.jpg');
background-repeat: no-repeat;
}
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/html/css/manager.css | CSS | gpl3 | 9,326 |
body{
line-height:1.4;
background:white;
}
body,input,textarea,select{
font-size:12px;
color:#333;
font-family:arial;
}
body,h1,h3,h4,p,ul,ol,li{margin:0;padding:0;}
a{cursor:pointer;color:#3d95b5;}
a,ul,li{
text-decoration:none;
list-style:none;
}
.fl{float:left;}
.fr{float:right;}
.layout_mid{
margin:0 auto;
width:940px;
}
.bg{
background:url('../images/ybole_index.png') no-repeat scroll -999em 0 transparent;
}
#index_top{
background-image:url('../images/ybole_index_top.png');
background-repeat:repeat-x;
height:125px;
width:100%;
}
.ybole_logo{
background-image:url('../images/ybole_logo.png');
width:200px;
height:82px;
margin-top:17px;
margin-left:30px;
}
.searcharea {
width:500px;
height:38px;
border:2px #2a97ca solid;
margin-top:59px;
margin-right:0px;
background-color:white;
display:inline;
filter:Glow(Color:#CCFF99, Strength:20);
}
.search_info{
border:0px white solid;
width:350px;
height:35px;
line-height:25px;
color:#6d95a8;
font-size:14px;
font-family:宋体, 微软雅黑;
margin-left:5px;
vertical-align:text-bottom;
}
.jobcategory{
background-position:-1px 1px;
width:102px;
height:35px;
border:0px;
color:white;
cursor:pointer;
margin-right:2px;
}
.btn_search{
background-position:-104px 1px;
height:35px;
width:35px;
border:0px;
cursor:pointer;
margin-right:1px;
}
.categorydetail{
width:500px;
height:94px;
clear:both;
z-index:9999;
position:relative;
display:none;
}
.arrow1,.arrow2{
width:0;
height:0;
position:relative;
left:20px;
overflow:hidden;
border-left:6px dotted transparent;
border-right:6px dotted transparent;
border-bottom:6px solid transparent;
}
.arrow1{top:-3px;border-bottom-color:#fff;z-index:99;}
.arrow2{top:-10px;border-bottom-color:#2a97ca;z-index:98;}
.detailbox{
width:500px;
height:85px;
border:1px #2a97ca solid;
position:relative;
top:-50px;
left:-1px;
background-color:white;
/*border-top:0px white solid;*/
}
.detailbox ul li{
width:150px;
height:26px;
float:left;
color:#576b80;
}
.index_wrap{
height:500px;
}
#index_info{
background-position:0px -38px;
width:271px;
height:331px;
-height:333px;
margin-top:-3px;
_margin-top:-4px;
}
.index_login{
background-position:-49px -68px;
width:173px;
height:32px;
margin-left:49px;
margin-top:30px;
border:0px;
cursor:pointer;
}
#index_msgs{
position: relative;
width:661px;
height:321px;
margin-top:6px;
margin-left:8px;
_1overflow:hidden;
z-index:100;
}
#index_msgs .bglt{
background-position:-274px -38px;
width:35px;
height:321px;
}
#index_msgs .bgmid{
width:591px;
height:305px;
border-top:8px #bce9fd solid;
border-bottom:8px #ffe678 solid;
}
#index_msgs .bgrt{
background-position:-310px -38px;
width:35px;
height:321px;
}
#index_msgs .bottom_cover{
position: absolute;
bottom: 15px;
left: 30px;
background: url(../images/bottomcover.png) no-repeat transparent;
height: 40px;
width: 590px;
}
.list_msgs{
width:591px;
height:293px;
border-top:1px #ace4fd solid;
border-bottom:1px #ffe05f solid;
_overflow:hidden;
overflow:hidden;
}
.index_listitem{
width:590px;
height:auto;
border-top:1px #cccccc dashed;
}
.item_pic{
width:50px;
height:50px;
padding:5px;
margin-top:17px;
border:1px #cccccc solid;
}
.item_content{
width:500px;
margin-top:15px;
margin-left:20px;
color:#333;
font-family:宋体, 微软雅黑;
font-size:12px;
line-height:22px;
}
.item_content a.nickname{
font-weight:bold;
}
li:first-child{
border-top:0px;
}
.msg_newnum{
background-position:-140px -3px;
width:191px;
height:34px;
margin-right:33px;
color:#737272;
font-size:14px;
font-family:幼圆;
font-weight:bold;
text-align:center;
float:right;
}
#index_hotnews{
width:940px;
height:180px;
float:left;
}
#index_hotnews .title{
font-family:幼圆;
font-size:24px;
font-weight:bold;
padding-top:20px;
color:#e22700;
}
#index_hotnews .hotjobs{
width:940px;
height:22px;
line-height:22px;
border-left:2px #2ea5dc solid;
font-family:宋体, 微软雅黑;
font-size:14px;
color:#2ea5dc;
margin-top:10px;
}
#index_hotnews .hotjobs a{
margin-left:10px;
}
#index_hotnews .hotjobs a:hover{
background-color:#bce9fd;
}
.hotcompanys{
width:940px;
height:44px;
line-height:44px;
border-left:2px #878787 solid;
margin-top:10px;
}
ul.hotcompanys li{
width:173px;
height:42px;
background:url('../images/company.png') no-repeat scroll -999em 0 transparent;
float:left;
margin-left:10px;
}
#cp1{background-position:0px 0px;}
#cp2{background-position:0px -44px;}
#cp3{background-position:0px -88px;}
#cp4{background-position:0px -132px;}
#cp5{background-position:0px -176px;}
#index_foot{
height:60px;
width:340px;
border-top:1px #d9d9d9 solid;
font-size:12px;
color:#727272;
text-align:center;
padding:10px;
margin:0px auto;
line-height:22px;
clear:both;
} | 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/html/css/ybole_index.css | CSS | gpl3 | 5,088 |
<?php
include_once('common.inc.php');
func_register(array(
'login' => array(
'callback' => 'user_login',
),
'relogin' => array(
'callback' => 'user_relogin',
),
'sina_login' => array(
'callback' => 'oauth_sina',
),
'sina_callback' => array(
'callback' => 'oauth_sina_callback',
),
'logout' => array(
'callback' => 'user_logout',
'security' => 'true',
),
));
function user_is_authenticated()
{
if (!isset($GLOBALS['user'])) {
if(array_key_exists('USER_AUTH', $_COOKIE)) {
_user_decrypt_cookie($_COOKIE['USER_AUTH']);
return true;
} else {
$GLOBALS['user'] = array();
return false;
}
}
elseif (!isset($GLOBALS['user']['id']))
return false;
else
return true;
}
function get_current_user_id()
{
return $GLOBALS['user']['id'];
}
function get_current_user_nickname()
{
return $GLOBALS['user']['nickname'];
}
function get_current_user_role()
{
return $GLOBALS['user']['role'];
}
function user_is_admin()
{
$role = get_current_user_role();
if($role===99)
return true;
return false;
}
function user_ensure_authenticated()
{
if(!user_is_authenticated())
header("Location: ".BASE_URL."login");
}
function user_ensure_admin()
{
user_ensure_authenticated();
if(!user_is_admin())
{
header("Location: ".BASE_URL."?errormsg=".urlencode("不要做坏事哟^o^"));
die("Access denied");
}
}
function sina_get_credentials()
{
include_once('sinaoauth.inc.php');
$c = new WeiboClient(SINA_AKEY, SINA_SKEY, $GLOBALS['user']['sinakey']['oauth_token'], $GLOBALS['user']['sinakey']['oauth_token_secret']);
$me = $c -> verify_credentials();
return($me);
}
function show_credentials()
{
$r = $GLOBALS['user']['nickname'].','.$GLOBALS['user']['role'];
theme('page', 'info', $r);
}
function user_login()
{
#Sina only:
header("Location: ".BASE_URL."sina_login");
#else:
#$content = "<a href='sina_login'>新浪微博登陆</a>";
#theme('page', '登陆', $content);
}
function user_logout($login = 0) {
unset($GLOBALS['user']);
setcookie('USER_AUTH', '', time() - 3600, '/');
if($login == 1)
header("Location: ".BASE_URL."login");
else
header("Location: ".BASE_URL);
}
function user_relogin() {
user_logout(1);
}
function _user_encryption_key() {
return ENCRYPTION_KEY;
}
function _user_encrypt_cookie() {
$plain_text = urlencode($GLOBALS['user']['nickname']) . ':' . urlencode($GLOBALS['user']['id']) . ':' . urlencode($GLOBALS['user']['role']) . ':';
$plain_text .= urlencode($GLOBALS['user']['sinakey']['oauth_token']) . ':' . urlencode($GLOBALS['user']['sinakey']['oauth_token_secret']);
$td = mcrypt_module_open('blowfish', '', 'cfb', '');
$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
mcrypt_generic_init($td, _user_encryption_key(), $iv);
$crypt_text = mcrypt_generic($td, $plain_text);
mcrypt_generic_deinit($td);
return base64_encode($iv.$crypt_text);
}
function _user_decrypt_cookie($crypt_text) {
$crypt_text = base64_decode($crypt_text);
$td = mcrypt_module_open('blowfish', '', 'cfb', '');
$ivsize = mcrypt_enc_get_iv_size($td);
$iv = substr($crypt_text, 0, $ivsize);
$crypt_text = substr($crypt_text, $ivsize);
mcrypt_generic_init($td, _user_encryption_key(), $iv);
$plain_text = mdecrypt_generic($td, $crypt_text);
mcrypt_generic_deinit($td);
list($GLOBALS['user']['nickname'], $GLOBALS['user']['id'], $GLOBALS['user']['role']
,$GLOBALS['user']['sinakey']['oauth_token'], $GLOBALS['user']['sinakey']['oauth_token_secret']
) = explode(':', $plain_text);
$GLOBALS['user']['nickname'] = urldecode($GLOBALS['user']['nickname']);
$GLOBALS['user']['id'] = urldecode($GLOBALS['user']['id']);
$GLOBALS['user']['role'] = intval(urldecode($GLOBALS['user']['role']));
$GLOBALS['user']['sinakey']['oauth_token'] = urldecode($GLOBALS['user']['sinakey']['oauth_token']);
$GLOBALS['user']['sinakey']['oauth_token_secret'] = urldecode($GLOBALS['user']['sinakey']['oauth_token_secret']);
}
function save_cookie($stay_logged_in = 1)
{
$cookie = _user_encrypt_cookie();
$duration = 0;
if ($stay_logged_in)
$duration = time() + (3600 * 24 * 365);
setcookie('USER_AUTH', $cookie, $duration, '/');
}
function oauth_sina()
{
include_once('sinaoauth.inc.php');
$o = new WeiboOAuth(SINA_AKEY, SINA_SKEY);
$keys = $o -> getRequestToken();
$callback = BASE_URL."sina_callback";
$aurl = $o -> getAuthorizeURL($keys['oauth_token'], false, $callback);
$_SESSION['sinakeys'] = $keys;
header("Location: $aurl");
}
function oauth_sina_callback()
{
include_once('sinaoauth.inc.php');
$o = new WeiboOAuth(SINA_AKEY, SINA_SKEY, $_SESSION['sinakeys']['oauth_token'], $_SESSION['sinakeys']['oauth_token_secret']);
$last_key = $o -> getAccessToken($_REQUEST['oauth_verifier']);
$GLOBALS['user']['sinakey'] = $last_key;
connect_db();
$me = sina_get_credentials() or die("Cound not get data from Sina API");
if(!$me['id'])
die("Cound not get data from Sina API");
$view = "SELECT * FROM accountbindings WHERE site_id='1' AND user_site_id='".$me['id']."'";
$list = mysql_query($view);
$row = mysql_fetch_array($list);
if(!$row)
{
include_once("uuid.inc.php");
$v4uuid = str_replace("-", "", UUID::v4());
$add = "INSERT INTO userinfo(nickname, email, microblogs, user_id, role_id, avatar_url) VALUES ('".$me['name']."', '', '1', '$v4uuid', '-1', '".$me['profile_image_url']."')";
$added = mysql_query($add) or die("Could not add entry 1");
$add = "INSERT INTO accountbindings(user_id, user_site_id, site_id, secret1, secret2) VALUES ('$v4uuid', '".$me['id']."', 1, '".$GLOBALS['user']['sinakey']['oauth_token']."', '".$GLOBALS['user']['sinakey']['oauth_token_secret']."')";
$added = mysql_query($add) or die("Could not add entry 2");
$id = $v4uuid;
$role = -1;
$nick = $me['name'];
}
else
{
$id = $row['user_id'];
$updatekey = "UPDATE accountbindings SET secret1='".$GLOBALS['user']['sinakey']['oauth_token']."',secret2='".$GLOBALS['user']['sinakey']['oauth_token_secret']."' WHERE user_id='$id'";
$result = mysql_query($updatekey);
$view = "SELECT * FROM userinfo WHERE user_id='$id'";
$list = mysql_query($view);
$row = mysql_fetch_array($list);
$role = $row['role_id'];
$nick = $row['nickname'];
}
$GLOBALS['user']['nickname'] = $nick;
$GLOBALS['user']['id'] = $id;
$GLOBALS['user']['role'] = $role;
$view = "INSERT INTO log_userlogin(user_id, ipaddress, login_time, useragent, cookies) VALUES('$id', '".$_SERVER["REMOTE_ADDR"]."', '".date('Y-m-d H:i:s')."', '".$_SERVER["HTTP_USER_AGENT"]."', '".$_SERVER["HTTP_COOKIE"]."')";
$list = mysql_query($view);
save_cookie();
header("Location: ".BASE_URL);
}
function db_get_sinakey()
{
connect_db();
$view = "SELECT * FROM accountbindings WHERE site_id='1' AND user_id='".$GLOBALS['user']['id']."'";
$list = mysql_query($view);
$row = mysql_fetch_array($list);
if(!row)
user_logout();
else
$GLOBALS['user']['sinakey'] = array(
'oauth_token' => $row['secret1'],
'oauth_token_secret' => $row['secret2'],
);
}
function get_nick_by_id($id)
{
connect_db();
$view = "SELECT nickname FROM userinfo WHERE user_id='$id'";
$list = mysql_query($view);
$row = mysql_fetch_array($list);
return $row[0];
}
?>
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/html/login.inc.php | PHP | gpl3 | 7,775 |
<?php
include_once('common.inc.php');
func_register(array(
'resume' => array(
'callback' => 'deal_resume',
'security' => 'true',
),
));
function resume_update()
{
include_once('login.php');
include_once("uuid.inc.php");
#$resume_id = str_replace("-", "", UUID::v4());
$user_id = get_current_user_id();
$resume_id = $user_id;
$name = get_post('name');
$sex = get_post('sex');
$date_birth = get_post('date_birth');
$live_in_now = get_post('live_in_now');
$live_in = get_post('live_in');
$cellphone = get_post('cellphone');
$email = get_post('email');
$content = get_post('content', false);
$show_avatar = get_post('show_avatar');
connect_db();
$view = "SELECT * FROM resumes WHERE resume_id = '$resume_id'";
$list = mysql_query($view);
$row = mysql_fetch_array($list);
if($row)
{
$view = "UPDATE resumes SET name='$name', sex='$sex', date_birth='$date_birth', live_in_now='$live_in_now', live_in='$live_in', cellphone='$cellphone', email='$email', show_avatar='$show_avatar', content='$content' WHERE resume_id = '$resume_id'";
$list = mysql_query($view) or die("Update error!");
}
else
{
$view = "INSERT INTO resumes(user_id, resume_id, name, sex, date_birth, live_in_now, live_in, cellphone, email, show_avatar, content) VALUES('$user_id','$resume_id','$name','$sex','$date_birth','$live_in_now','$live_in','$cellphone','$email','$show_avatar','$content')";
$list = mysql_query($view) or die("Update error!");
}
}
function resume_current()
{
include_once('login.php');
$user_id = get_current_user_id();
$resume_id = $user_id;
echo $resume_id;
}
function resume_show()
{
$args = func_get_args();
$key = $args[2];
include_once('login.inc.php');
$id = get_current_user_id();
#FIXME: things to fix
if(!$key)
{
$key = $id;
$theme = "resumeapi";
}
else
$theme = "resumeshow";
connect_db();
$view = "SELECT * FROM resumes WHERE resume_id = '$key'";
$list = mysql_query($view);
$row = mysql_fetch_array($list);
if($row)
{
$_id = $row['user_id'];
$view = "SELECT * FROM tweets AS t, (SELECT * FROM applications WHERE deleted = 0 AND resume_id = '$key') AS ap, (SELECT * from accountbindings WHERE user_id = '$id') AS ac WHERE t.deleted = 0 AND ap.tweet_id = t.tweet_id AND t.user_site_id = ac.user_site_id AND t.site_id = ac.site_id";
$list = mysql_query($view);
$row = mysql_fetch_array($list);
if($row or $id == $_id)
{
if($row)
{
$view = "UPDATE applications SET view_time = '".date('Y-m-d H:i:s')."' WHERE resume_id = '$key' AND tweet_id = '".$row['tweet_id']."' AND user_id = '$_id'";
$list = mysql_query($view);
}
$view = "SELECT * FROM resumes WHERE resume_id = '$key'";
$list = mysql_query($view);
$row = mysql_fetch_array($list);
theme($theme, $row);
}
else
die("Not authorized");
}
else
die("Resume not found");
}
function theme_resumeapi($data)
{
$content = $data['name'].'|'.$data['sex'].'|'.$data['date_birth']
.'|'.$data['live_in_now'].'|'.$data['live_in'].'|'.$data['cellphone']
.'|'.$data['email'].'|'.$data['show_avatar'].'|'.$data['content'];
echo $content;
}
function resume_preview()
{
$data = array(
'name' => get_post('name'),
'sex' => get_post('sex'),
'date_birth' => get_post('date_birth'),
'live_in_now' => get_post('live_in_now'),
'live_in' => get_post('live_in'),
'cellphone' => get_post('cellphone'),
'email' => get_post('email'),
'content' => get_post('content', false),
'show_avatar' => get_post('show_avatar'),
);
theme('resume', '个人简历预览', $data);
}
function theme_resumeshow($data)
{
theme('resume', '个人简历', $data);
}
function theme_resume($title, $data)
{
include_once("avatar.inc.php");
if($data['show_avatar'])
$avatar = '<img height="83" width="83" alt="" src="'.get_avatar($data['user_id'], "big").'" />';
else
$avatar = "";
$content = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>'.$title.' - 歪伯乐微招聘 - 微博招聘、求职、简历信息,一站聚合、管理、定制</title>
<link href="'.BASE_URL.'css/profile.css" type="text/css" rel="Stylesheet" />
<link rel="icon" href="favicon_big.png" sizes="48x48">
<link rel="shortcut icon" href="/favicon.ico" />
</head>
<body>
<div id="head">
<a id="logo" href="/"></a>
</div>
<div id="content">
<div id="basic">
<div id="basic1">
'.$avatar.'
<span>'.$data['name'].'('.$data['sex'].')</span>
</div>
<div id="basic2">
<span class="right">'.$data['email'].'</span> <span class="right">Email:</span> <span
class="right"> </span> <span class="right">'.$data['cellphone'].'</span>
<span class="right">Tel:</span>
</div>
<div id="basic3">
<span class="right">'.$data['live_in'].'</span> <span class="right">户口地:</span> <span class="right"> </span>
<span class="right">'.$data['live_in_now'].'</span> <span class="right">现居地:</span> <span class="right">
</span> <span class="right">'.$data['date_birth'].'</span> <span class="right">出生日期:</span>
</div>
</div>
<div id="info">
'.$data['content'].'
</div>
</div>
</body>
</html>';
echo $content;
}
function deal_resume($query)
{
$key = (string) $query[1];
if(!$key)
die("Invalid Argument!");
$function = 'resume_'.$key;
if (!function_exists($function))
die("Invalid Argument!");
return call_user_func_array($function, $query);
}
?>
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/html/resume.inc.php | PHP | gpl3 | 6,539 |
body{
line-height:1.4;
background:white;
}
body,input,textarea,select{
font-size:12px;
color:#333;
font-family:arial;
}
input{
outline:none;
}
body,h1,h3,h4,p,ul,ol,li{margin:0;padding:0;}
a{cursor:pointer;color:#3d95b5;}
a,ul,li{
text-decoration:none;
list-style:none;
}
.fl{float:left;}
.fr{float:right;}
.layout_mid{
margin:0 auto;
width:940px;
}
.bg{
background:url('images/ybole_index.png') no-repeat -999em 0;
}
#index_top{
background-image:url('images/ybole_index_top.png');
background-repeat:repeat-x;
height:125px;
width:100%;
}
.ybole_logo{
background-image:url('images/ybole_logo.png');
width:200px;
height:82px;
margin-top:17px;
margin-left:30px;
}
.searcharea {
width:500px;
height:38px;
border:2px #2a97ca solid;
margin-top:59px;
margin-right:0px;
background-color:white;
display:inline;
filter:Glow(Color:#CCFF99, Strength:20);
display:inline;
}
.search_info{
border:0px white solid;
width:350px;
height:22px;
line-height:22px;
color:#6d95a8;
font-size:18px;
font-family:微软雅黑,宋体 ;
margin-left:5px;
position:relative;
top:5px;
}
.jobcategory{
background-position:-1px 1px;
width:102px;
height:35px;
border:0px;
color:white;
cursor:pointer;
margin-right:2px;
}
.btn_search{
background-position:-104px 1px;
height:35px;
width:35px;
border:0px;
cursor:pointer;
margin-right:1px;
}
.categorydetail{
width:500px;
height:94px;
clear:both;
z-index:9999;
position:relative;
display:none;
}
.arrow1,.arrow2{
width:0;
height:0;
position:relative;
left:20px;
overflow:hidden;
border-left:6px dotted transparent;
border-right:6px dotted transparent;
border-bottom:6px solid transparent;
}
.arrow1{top:-3px;border-bottom-color:#fff;z-index:99;}
.arrow2{top:-10px;border-bottom-color:#2a97ca;z-index:98;}
.detailbox{
width:500px;
height:85px;
border:1px #2a97ca solid;
position:relative;
top:-10px;
left:-1px;
background-color:white;
/*border-top:0px white solid;*/
}
.detailbox ul li{
width:150px;
height:26px;
float:left;
color:#576b80;
}
.index_wrap{
height:500px;
}
#index_info{
background-position:0px -38px;
width:271px;
height:331px;
-height:333px;
margin-top:-3px;
_margin-top:-4px;
}
.index_login{
background-position:-49px -68px;
width:173px;
height:32px;
margin-left:49px;
margin-top:30px;
border:0px;
cursor:pointer;
}
#index_msgs{
position: relative;
width:661px;
height:321px;
margin-top:6px;
margin-left:8px;
_1overflow:hidden;
z-index:100;
}
#index_msgs .bglt{
background-position:-274px -38px;
width:35px;
height:321px;
}
#index_msgs .bgmid{
width:591px;
height:305px;
border-top:8px #bce9fd solid;
border-bottom:8px #ffe678 solid;
}
#index_msgs .bgrt{
background-position:-310px -38px;
width:35px;
height:321px;
}
#index_msgs .bottom_cover{
position: absolute;
bottom: 15px;
left: 30px;
background: url('images/bottomcover.png') no-repeat;
height: 40px;
width: 590px;
}
.list_msgs{
width:591px;
height:293px;
border-top:1px #ace4fd solid;
border-bottom:1px #ffe05f solid;
_overflow:hidden;
overflow:hidden;
}
.index_listitem{
width:590px;
height:105px;
_height:102px;
border-top:1px #cccccc dashed;
}
.item_pic{
width:50px;
height:50px;
padding:5px;
margin-top:17px;
border:1px #cccccc solid;
}
.item_content{
width:500px;
margin-top:15px;
margin-left:20px;
color:#333;
font-family:宋体, 微软雅黑;
font-size:12px;
line-height:22px;
}
.item_content a.nickname{
font-weight:bold;
}
li:first-child{
border-top:0px;
}
.msg_newnum{
background-position:-140px -3px;
width:191px;
height:34px;
margin-right:33px;
color:#737272;
font-size:14px;
font-family:幼圆;
font-weight:bold;
text-align:center;
float:right;
}
#index_hotnews{
width:940px;
height:180px;
float:left;
}
#index_hotnews .title{
font-family:幼圆;
font-size:24px;
font-weight:bold;
padding-top:20px;
color:#e22700;
}
#index_hotnews .hotjobs{
width:940px;
height:22px;
line-height:22px;
border-left:2px #2ea5dc solid;
font-family:宋体, 微软雅黑;
font-size:14px;
color:#2ea5dc;
margin-top:10px;
}
#index_hotnews .hotjobs a{
margin-left:10px;
}
#index_hotnews .hotjobs a:hover{
background-color:#bce9fd;
}
.hotcompanys{
width:940px;
height:44px;
line-height:44px;
border-left:2px #878787 solid;
margin-top:10px;
}
ul.hotcompanys li{
width:173px;
height:42px;
background:url('images/company.png') no-repeat -999em 0;
float:left;
margin-left:10px;
}
#cp1{background-position:0px 0px;}
#cp2{background-position:0px -44px;}
#cp3{background-position:0px -88px;}
#cp4{background-position:0px -132px;}
#cp5{background-position:0px -176px;}
#index_foot{
height:60px;
width:340px;
border-top:1px #d9d9d9 solid;
font-size:12px;
color:#727272;
text-align:center;
padding:10px;
margin:0px auto;
line-height:22px;
clear:both;
} | 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/html/ybole_index.css | CSS | gpl3 | 5,092 |
<?
include_once('config.inc.php');
function connect_db(){
global $db_host, $db_name, $db_user, $db_pass;
mysql_pconnect($db_host, $db_user, $db_pass);
mysql_query("SET NAMES 'utf8'");
@mysql_select_db($db_name) or die ("Unable to connect to database");
}
function func_register($items) {
foreach ($items as $url => $item)
$GLOBALS['func_registry'][$url] = $item;
}
function long_url($shortURL)
{
if (!defined('LONGURL_KEY'))
return $shortURL;
$url = "http://www.longurlplease.com/api/v1.1?q=" . $shortURL;
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl_handle,CURLOPT_URL,$url);
$url_json = curl_exec($curl_handle);
curl_close($curl_handle);
$url_array = json_decode($url_json,true);
$url_long = $url_array["$shortURL"];
if ($url_long == null)
return $shortURL;
if (substr($url_long,0,4) !== "http")
{
preg_match("/^(http:\/\/)?([^\/]+)/i", $shortURL, $matches);
$host = $matches[2];
$url_long="http://".$host."/".$url_long;
}
return $url_long;
}
function format_str($str, $strict = true)
{
$str = str_replace("'", "", $str);
$str = str_replace("\\", "/", $str);
//$str = str_replace("\"", "", $str);
if($strict)
{
$str = str_replace("<", "<", $str);
$str = str_replace(">", ">", $str);
}
else
{
$str = preg_replace('$<\s*script$iu', "<script", $str);
$str = preg_replace('$<\s*iframe$iu', "<iframe", $str);
}
return $str;
}
function get_post($item, $strict = true)
{
if(isset($_POST[$item]))
{
$item = format_str(urldecode($_POST[$item]), $strict);
}
else
$item = false;
return $item;
}
function func_execute_active_handler() {
if(isset($_GET['q']))
{
$q = format_str($_GET['q']);
$query = (array) explode('/', $q);
$GLOBALS['page'] = $query[0];
}
else
{
$query = "";
$GLOBALS['page'] = "";
}
$page = $GLOBALS['func_registry'][$GLOBALS['page']];
if (!$page) {
header('HTTP/1.0 404 Not Found');
die('404 - Page not found.');
}
if (isset($page['security']) && $page['security'])
user_ensure_authenticated();
if (isset($page['admin']) && $page['admin'])
user_ensure_admin();
if (function_exists('config_log_request'))
config_log_request();
if (function_exists($page['callback']))
return call_user_func($page['callback'], $query);
return false;
}
function get_categories()
{
connect_db();
$view = "SELECT * FROM categories ORDER BY cat_id ASC";
$list = mysql_query($view);
$result = array();
$i = 0;
while($row = mysql_fetch_array($list))
$result[$i++] = $row;
return $result;
}
function get_counts()
{
connect_db();
$view = "SELECT * FROM counts";
$list = mysql_query($view);
$result = array();
$i = 0;
while($row = mysql_fetch_array($list))
$result[$row['type']] = $row['count'];
return $result;
}
?>
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/html/common.inc.php | PHP | gpl3 | 3,163 |
#!/usr/bin/env python
#coding=utf-8
from weibopy.auth import OAuthHandler
from weibopy.api import API
import sqlite3
from threading import Thread
from Queue import Queue
from time import sleep
from datetime import datetime, timedelta, date, time
import sys
from tag_detect import detect
import os
from signal import SIGTERM
from crawler_id import idlist as A
reload(sys)
sys.setdefaultencoding('utf-8')
PAGE = 2
START = 1
B = []
try:
tmp = sys.argv[1].split("-")
if len(tmp) < 2:
PAGE = int(tmp[0])
else:
START, PAGE = tmp
START = int(START)
PAGE = int(PAGE) - START + 1
except IndexError:
pass
LOCK = '/var/lock/sinacrawler.lock'
if os.path.isfile(LOCK):
f = open(LOCK, "r").read()
try:
os.kill(int(f), SIGTERM)
except:
pass
pid = os.getpid()
f = open(LOCK, "w")
f.write("%d"%(pid))
f.close()
def now():
return str(datetime.now()) + " "
print now() + "Initializing..."
def iszhaopin(s):
keywords = [(u"招聘", ),
(u"诚聘", ),
(u"诚招", ),
(u"新职位", ),
(u"急聘", ),
# (u"需要", u"人员"),
(u"招人", ),
(u"招", u"人员"),
# (u"挖角", ),
(u"急招", ),
(u"伯乐奖", ),
(u"招兵买马", ),
(u"发送简历", ),
(u"发简历", ),
(u"email简历", ),
(u"岗位", u"空缺"),
(u"职位", u"名"),
(u"推荐", u"人才"),
(u"荐才", u"注明应聘"),
(u"内推", u"实习生"),
(u"内部推荐", u"精英"),
(u"换工作", u"高手"),
(u"换跑道", u"千里马"),
(u"欢迎加入我们", ),
(u"兼职招聘", ),
(u"创业招聘", ),
]
declinekeywords = [(u"智联招聘", ),
(u"寻人启事", ),
(r"//@", ),
]
match = False
for keywordset in keywords:
match2 = True
for key in keywordset:
if key not in s:
match2 = False
break
if match2:
match = True
break
if not match:
return False
for keywordset in declinekeywords:
match = True
for key in keywordset:
if key not in s:
match = False
break
if match:
return False
return True
class SinaFetch():
consumer_key= "961495784"
consumer_secret ="47d9d806a1dc04cc758be6f7213465bc"
def __init__(self):
""" constructor """
def getAtt(self, key):
try:
return self.obj.__getattribute__(key)
except Exception, e:
#print e
return ''
def getAttValue(self, obj, key):
try:
return obj.__getattribute__(key)
except Exception, e:
print e
return ''
def setToken(self, token, tokenSecret):
self.auth = OAuthHandler(self.consumer_key, self.consumer_secret)
self.auth.setToken(token, tokenSecret)
self.api = API(self.auth)
def auth(self):
self.auth = OAuthHandler(self.consumer_key, self.consumer_secret)
auth_url = self.auth.get_authorization_url()
print 'Please authorize: ' + auth_url
verifier = raw_input('PIN: ').strip()
self.auth.get_access_token(verifier)
self.api = API(self.auth)
def friends_timeline(self, page):
timeline = self.api.friends_timeline(count=200, page=page)
results = []
for line in timeline:
self.obj = line
mid = self.getAtt("id")
text = unicode(self.getAtt("text"))
posttime = self.getAtt("created_at")
source = self.getAtt("source")
user = self.getAtt("user")
try:
thumbnail = self.getAtt("thumbnail_pic")
if thumbnail[:7] != "http://":
thumbnail = ""
except:
thumbnail = ""
self.obj = user
userid = self.getAtt("id")
name = unicode(self.getAtt("screen_name"))
avatar = self.getAtt("profile_image_url")
if iszhaopin(text):
results += [(userid, name, avatar, mid, text, posttime, source, thumbnail)]
return results
q = Queue()
def working():
global B
cateid, crawlerinfo = q.get()
test = SinaFetch()
test.setToken(crawlerinfo[1], crawlerinfo[2])
for page in range(START, PAGE + START):
while True:
try:
result = test.friends_timeline(page)
break
except:
print now() + "Crawler %s Cate:%d page %d/%d Failed, Retrying..." % (crawlerinfo[0], cateid, page, START + PAGE - 1)
B += [(cateid, result)]
print now() + "Crawler %s Cate:%d page %d/%d Done." % (crawlerinfo[0], cateid, page, START + PAGE - 1)
sleep(0.2)
q.task_done()
for crawler in A:
q.put(crawler)
t = Thread(target=working)
t.setDaemon(True)
t.start()
sleep(0.2)
print now() + "Preparing cursors to operate database..."
path = '/var/www/0f523140-f3b3-4653-89b0-eb08c39940ad/src/crawler'
#path = os.path.dirname(sys.argv[0])
os.chdir(path)
import MySQLdb, uuid
db = MySQLdb.connect("205.185.126.152","apis","G2WvPRsxGEr77wEd","apis",charset="utf8")
c = db.cursor()
#_tagid = open("tag_list_withid.dict", "r").read().decode("utf-8").split('\n')
c.execute("SELECT * FROM tags")
tagid = {}
tagnoid = []
for i in c:
tag_id, tag = i[0], i[1]
tagnoid += [tag]
tagid[tag] = tag_id
f = open("tag_list_nogroup.dict", "w")
f.write('\n'.join(tagnoid))
f.close()
#Disabled temperarly
#d = detect()
#for line in _tagid:
# tag_id, tag = line.split()
# tagid[tag] = tag_id
print now() + "Dealing with pending tweets..."
c.execute("SELECT * FROM pending_tweets LIMIT 0 , 1")
while True:
try:
tweet_site_id, post_screenname, profile_image_url, source, post_datetime, content, type_, user_site_id, tweet_id, site_id, thumbnail = c.fetchone()
c.execute("DELETE FROM pending_tweets WHERE tweet_id = %s", (tweet_id,))
c.execute("SELECT * FROM tweets WHERE site_id = %s AND tweet_site_id = %s", (site_id, tweet_site_id))
if c.fetchone() != None:
print now() + "Dulplicate pending item:", tweet_site_id
c.execute("SELECT * FROM pending_tweets LIMIT 0 , 1")
continue
c.execute("""INSERT INTO tweets (
site_id, tweet_id, user_site_id, content, post_datetime,
type, tweet_site_id, favorite_count, application_count,
post_screenname, profile_image_url, source, thumbnail)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""",
(site_id, tweet_id, user_site_id, content, post_datetime,
type_, tweet_site_id, 0, 0,
post_screenname, profile_image_url, source, thumbnail))
c.execute("""INSERT INTO cat_relationship (
tweet_id, cat_id)
VALUES (%s, %s)""",
(tweet_id, 0,))
#for tag in d.Split(content)[:]:
for tag in tagnoid:
if tag.lower() not in content.lower():
continue
try:
c.execute("""INSERT INTO tag_relationship (
tag_id, tweet_id)
VALUES (%s, %s)""",
(tagid[tag], tweet_id))
c.execute("SELECT count, tag_group FROM tags WHERE tag_id = %s", (tagid[tag],))
t = c.fetchone()
if t == None:
print now() + "Error updating count: No tag %s found!" % (tag, )
else:
count = t[0] + 1
tag_group = t[1]
if tag_group != 0:
#print tag_group, "Tag group detected!"
c.execute("UPDATE tags SET count = %s WHERE tag_group = %s", (count, tag_group))
else:
c.execute("UPDATE tags SET count = %s WHERE tag_id = %s", (count, tagid[tag]))
except KeyError:
print now() + "Error updating tag: No tag %s found!" % (tag, )
print now() + "Inserted pending item:", tweet_site_id
c.execute("SELECT * FROM pending_tweets LIMIT 0 , 1")
except:
break
q.join()
print now() + "Craw Complete."
for cat, items in B:
for userid, name, avatar, mid, text, posttime, source, thumbnail in items:
tweet_id = uuid.uuid4().hex
c.execute("SELECT * FROM tweets WHERE tweet_site_id = %s", (mid,))
if c.fetchone() != None:
print now() + "Dulplicate item: %d, %d" % (cat, mid)
continue
c.execute("""INSERT INTO tweets (
site_id, tweet_id, user_site_id, content, post_datetime,
type, tweet_site_id, favorite_count, application_count,
post_screenname, profile_image_url, source, thumbnail)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""",
(1, tweet_id, userid, text, posttime,
2, mid, 0, 0,
name, avatar, source, thumbnail))
c.execute("""INSERT INTO cat_relationship (
cat_id, tweet_id)
VALUES (%s, %s)""",
(cat, tweet_id))
#for tag in d.Split(text)[:]:
for tag in tagnoid:
if tag.lower() not in text.lower():
continue
try:
c.execute("""INSERT INTO tag_relationship (
tag_id, tweet_id)
VALUES (%s, %s)""",
(tagid[tag], tweet_id))
c.execute("SELECT count, tag_group FROM tags WHERE tag_id = %s", (tagid[tag],))
t = c.fetchone()
if t == None:
print now() + "Error updating count: No tag %s found!" % (tag, )
else:
count = t[0] + 1
tag_group = t[1]
if tag_group != 0:
#print tag_group, "Tag group detected!"
c.execute("UPDATE tags SET count = %s WHERE tag_group = %s", (count, tag_group))
else:
c.execute("UPDATE tags SET count = %s WHERE tag_id = %s", (count, tagid[tag]))
except KeyError:
print now() + "Error updating tag: No tag %s found!" % (tag, )
c.execute("SELECT count FROM categories WHERE cat_id = %s", (cat,))
t = c.fetchone()
if t == None:
print now() + "Error updating count: No category %d found!" % (cat, )
else:
count = t[0] + 1
c.execute("UPDATE categories SET count = %s WHERE cat_id = %s", (count, cat))
print now() + "Inserted item: %d, %d" % (cat, mid)
#counting
c.execute("SELECT COUNT(*) FROM tweets WHERE post_datetime > %s", (datetime.combine(date.today(), time()),))
t = c.fetchone()
if t == None:
count = 0
else:
count = t[0]
c.execute("UPDATE counts SET count = %s WHERE type = %s", (count, "tweets_today"))
c.execute("SELECT COUNT(*) FROM tweets WHERE post_datetime > %s", (datetime.combine(date.today(), time()) - timedelta(days = datetime.now().isoweekday() - 1),))
t = c.fetchone()
if t == None:
count = 0
else:
count = t[0]
c.execute("UPDATE counts SET count = %s WHERE type = %s", (count, "tweets_thisweek"))
db.commit()
c.close()
print now() + "Wrote Database."
os.unlink(LOCK)
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/sina.py | Python | gpl3 | 12,022 |
from weibopy.auth import OAuthHandler
from weibopy.api import API
from threading import Thread
from Queue import Queue
from time import sleep
from datetime import datetime, timedelta, date, time
import sys
from tag_detect import detect
import os
from crawler_id import idlist as A
from weibopy.error import WeibopError
B = []
def now():
return str(datetime.now()) + " "
print now() + "Initializing..."
class SinaFollow():
consumer_key= "961495784"
consumer_secret ="47d9d806a1dc04cc758be6f7213465bc"
def __init__(self):
""" constructor """
def getAtt(self, key):
try:
return self.obj.__getattribute__(key)
except Exception, e:
print e
return ''
def getAttValue(self, obj, key):
try:
return obj.__getattribute__(key)
except Exception, e:
print e
return ''
def setToken(self, token, tokenSecret):
self.auth = OAuthHandler(self.consumer_key, self.consumer_secret)
self.auth.setToken(token, tokenSecret)
self.api = API(self.auth)
def auth(self):
self.auth = OAuthHandler(self.consumer_key, self.consumer_secret)
auth_url = self.auth.get_authorization_url()
print 'Please authorize: ' + auth_url
verifier = raw_input('PIN: ').strip()
self.auth.get_access_token(verifier)
self.api = API(self.auth)
def friendship_create(self, screen_name):
timeline = self.api.create_friendship(screen_name = screen_name)
f = unicode(open("follow_id.list", "r").read(), "utf-8").replace("\r","").split("\n")
for line in f:
b = line.split('\t')
user = b[0]
cats = [int(x) for x in b[1:]]
B += [(user, cats)]
q = Queue()
def working():
global B
count = 0
crawler = q.get()
test = SinaFollow()
test.setToken(crawler[1][2], crawler[1][3])
for user, cats in B:
if crawler[0] in cats:
count += 1
sleep(0.5)
try:
test.friendship_create(user)
print now(), "Crawler", crawler[0], "Followed", count, ":", user
except WeibopError as (error_msg):
print now(), "Crawler", crawler[0], "Error following", count, ":", user, "Reason:",error_msg
q.task_done()
for crawler in enumerate(A):
q.put(crawler)
t = Thread(target=working)
t.setDaemon(True)
t.start()
sleep(2)
q.join()
print now() + "Follow Complete."
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/follow.py | Python | gpl3 | 2,591 |
import sys, uuid
from datetime import datetime
def now():
return str(datetime.now()) + " "
dic = open("tag_list.dict", "r")
result = []
dic2 = []
dic3 = []
for item in dic:
m = unicode(item, "utf-8").split()
if len(m) > 1:
tag, group = m
else:
tag, group = m[0], "0"
tag_id = uuid.uuid4().hex
result += [(tag_id, tag, group, 0)]
dic2 += [tag]
dic3 += [(tag_id, tag)]
dic.close()
#dic = open("tag_list_nogroup.dict", "w")
#dic.write("\n".join(dic2).encode("utf-8").lower())
#dic.close()
#dic = open("tag_list_withid.dict", "w")
#dic.write("\n".join([" ".join(x) for x in dic3]).encode("utf-8").lower())
#dic.close()
print now() + "Wrote Dict."
import MySQLdb
db = MySQLdb.connect("127.0.0.1","apis","G2WvPRsxGEr77wEd","apis",charset="utf8")
c = db.cursor()
c.executemany("""INSERT INTO tags (tag_id, name, tag_group, count) VALUES (%s, %s, %s, %s)""",
result)
db.commit()
c.close()
print now() + "Wrote Database."
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/tag_init.py | Python | gpl3 | 1,017 |
#coding:utf-8
from threading import Thread
from Queue import Queue
from time import sleep
import sqlite3
import sys, re, StringIO
import urllib2 as urllib
q = Queue()
NUM = 17
JOBS = 3000
results = []
def craw(arguments):
global results
try:
a = unicode(urllib.urlopen("http://tbole.com/result.php?searchid=%d" % (arguments,)).read(), "gbk")
a = a.replace("\n", " ").replace("\r", "")
b = re.findall(u"<span class=\"about_text\">[^<]+?</span>(.+?)</div>", a)
for c in b:
d = re.findall(u"<span><a[^>]*>(.+?)</a></span>", c)
for e in d:
results += [e]
print arguments, "Done."
except:
print arguments, "Error."
pass
sleep(0.2)
def working():
while True:
arguments = q.get()
craw(arguments)
q.task_done()
for i in range(NUM):
t = Thread(target=working)
t.setDaemon(True)
t.start()
for i in range(JOBS):
q.put(i)
q.join()
print "Craw completed."
b = {}
for a in results:
b[a] = 1;
f = open("tbole_key.txt", "w")
f.write("\n".join(b.keys()).encode('utf-8'))
f.close()
print "Wrote results."
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/tbole.py | Python | gpl3 | 1,158 |
#coding:utf-8
#!/usr/bin/env python
from threading import Thread
from Queue import Queue
from time import sleep
import sqlite3
import sys, re, StringIO, os
import urllib2 as urllib
from datetime import datetime
q = Queue()
NUM = 20
TIMEOUT = 0.1
C = (u"名人堂", u"媒体汇", u"品牌馆")
def now():
return str(datetime.now()) + " "
print now() + "Initializing..."
def craw(url, tag1, tag2, tag3):
print now() + "Crawler",tag1,tag2,tag3,"Initializing..."
while True:
try:
a = unicode(urllib.urlopen(url).read(), "utf-8")
break
except:
print now() + "Crawler",tag1,tag2,tag3,"initialize failed, Retrying..."
sleep(TIMEOUT)
f = open(tag1 + os.sep + tag2 + os.sep + tag3 + ".txt", "w")
i = 0
while True:
i += 1
print now() + "Crawler",tag1,tag2,tag3,"Page",i,"Crawing..."
b = re.findall("<a href=\"(home.php\?uid=(\d+)&[^\"]+)\">([^<]+)</a>", a)
for urltmp, userid, nickname in b:
url = 'http://t.sina.cn/dpool/ttt/' + urltmp.replace("home.php", "user.php")
while True:
try:
c = unicode(urllib.urlopen(url).read(), "utf-8")
break
except:
try:
print now() + "Crawler",tag1,tag2,tag3,"Page",i,"User",nickname,"fetch failed, Retrying..."
except:
print now() + "Crawler",tag1,tag2,tag3,"Page",i,"User XXX","fetch failed, Retrying..."
sleep(TIMEOUT)
try:
d = re.findall(u"认证说明:([^<]+)", c)[0]
except:
d = ""
try:
print now() + "Crawler",tag1,tag2,tag3,"Page",i,"User",nickname,"("+d+")","Fetched."
except:
print now() + "Crawler",tag1,tag2,tag3,"Page",i,"User XXX","(XXX)","Fetched."
f.write((userid + '\t' + nickname + '\t' + d + '\n').encode('utf-8'))
sleep(TIMEOUT)
try:
nextpage = re.findall(u"<a href=\"([^\"]+)\">下页</a>", a)[0].replace("&", "&")
except:
f.close()
return
sleep(TIMEOUT)
url = "http://t.sina.cn" + nextpage
while True:
try:
a = unicode(urllib.urlopen(url).read(), "utf-8")
break
except:
print now() + "Crawler",tag1,tag2,tag3,"Page",i+1,"fetch failed, Retrying..."
sleep(TIMEOUT)
def working():
global q
while True:
arguments = q.get()
craw(*arguments)
q.task_done()
for i in range(NUM):
t = Thread(target=working)
t.setDaemon(True)
t.start()
for ntagt, tag1 in enumerate(C[2:]):
ntag1 = ntagt + 2
print now() + "Seeking",tag1,"..."
try:
os.mkdir(tag1)
except:
pass
url = "http://t.sina.cn/dpool/ttt/v2star.php?cat=%d&sorttype=industry&gsid=3_5bc659f93ba7c3eac863570828ad7bccb5" % (ntag1 + 1,)
while True:
try:
a = unicode(urllib.urlopen(url).read(), "utf-8")
break
except:
print now() + "Seeking",tag1,"failed, Retrying..."
sleep(TIMEOUT)
b = re.findall("<a href=\"(/dpool/ttt/v2star.php\?cat=%d&ta[^\"]+)\">([^<]+)</a>" % (ntag1 + 1,), a)
if(len(b)) == 0:
b = [[url, tag1]]
for (url, tag2) in b:
print now() + "Seeking",tag1,tag2,"..."
try:
os.mkdir(tag1 + os.sep + tag2)
except:
pass
if url[0] == '/':
url = 'http://t.sina.cn' + url.replace('&', '&')
while True:
try:
a = unicode(urllib.urlopen(url).read(), "utf-8")
break
except:
print now() + "Seeking",tag1,tag2,"failed, Retrying..."
sleep(TIMEOUT)
b2 = re.findall("<a href=\"(/dpool/ttt/v2star.php\?cat=%d&su[^\"]+)\">([^<]+)</a>" % (ntag1 + 1,), a)
for (url, tag3) in b2:
q.put(('http://t.sina.cn' + url.replace('&', '&'), tag1, tag2, tag3))
q.join()
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/mingrentang/mingren.py | Python | gpl3 | 4,271 |
#coding:utf-8
from threading import Thread
from Queue import Queue
import sqlite3
import sys, re, StringIO
from time import sleep
import urllib2, urllib
TARGET = 1000
NUM = 10
ids = []
results = []
count = 0
q = Queue()
KEYS = ['招聘']
class UserAgentProcessor(urllib2.BaseHandler):
"""A handler to add a custom UA string to urllib2 requests
"""
def __init__(self):
self.handler_order = 100
self.ua = "User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.25 (KHTML, like Gecko) Ubuntu/11.04 Chromium/12.0.707.0 Chrome/12.0.707.0 Safari/534.25"
def http_request(self, request):
request.add_header("User-Agent", self.ua)
return request
https_request = http_request
opener = urllib2.build_opener(UserAgentProcessor())
urllib2.install_opener(opener)
def craw(key):
global count, results, q, ids
key = key.replace(" ", "%20")
print key
params = urllib.urlencode({'keyword': key, 'smblog': '搜微博'})
a = urllib2.urlopen("http://t.sina.cn/dpool/ttt/search.php?PHPSESSID=f54ade2b393f1a28b59db06939c8f420", data=params)
while True:
b = a.read().split('<div class="c"')
for item in b[1:-2]:
try:
if "转发了" in item:
continue
id = re.findall('id="([^"]+)"', item)[0]
text = re.findall('<span class="ctt">(.+?)</span>[\[\&]', item)[0]
text = re.sub("<.+?>","",text)
if text[0] == ':':
text = text[1:]
if id in ids:
continue
print id, text
results.append((id, unicode(text,'utf-8')))
ids.append(id)
count += 1
#print count
if count > TARGET:
return
except:
pass
try:
nextpage = re.findall("<a href=\"([^\"]+)\">下页</a>", b[-3])[0].replace("&", "&")
except:
return
sleep(0.1)
a = urllib.urlopen("http://t.sina.cn/dpool/ttt/" + nextpage)
def working():
global q
while True:
arguments = q.get()
craw(arguments)
q.task_done()
for i in range(NUM):
t = Thread(target=working)
t.setDaemon(True)
t.start()
for key in KEYS:
q.put(key)
q.join()
print "Craw completed."
sys.exit(1)
conn = sqlite3.connect("train.dat")
cur = conn.cursor()
try:
cur.execute("create table tweets (id text, content text)")
except sqlite3.OperationalError:
pass
cur.executemany("insert into tweets values (?,?)", results)
conn.commit()
cur.close()
conn.close()
print "Wrote Database."
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/mobilesina.py | Python | gpl3 | 2,690 |
#!/usr/bin/env python
#coding=utf-8
from weibopy.auth import OAuthHandler
from weibopy.api import API
import sqlite3
from threading import Thread
from Queue import Queue
from time import sleep
from datetime import datetime, timedelta, date, time
import sys
from tag_detect import detect
import os
from signal import SIGTERM
from crawler_id import idlist as A
reload(sys)
sys.setdefaultencoding('utf-8')
PAGE = 2
START = 1
B = []
try:
tmp = sys.argv[1].split("-")
if len(tmp) < 2:
PAGE = int(tmp[0])
else:
START, PAGE = tmp
START = int(START)
PAGE = int(PAGE) - START + 1
except IndexError:
pass
LOCK = '/var/lock/sinacrawler.lock'
if os.path.isfile(LOCK):
f = open(LOCK, "r").read()
try:
os.kill(int(f), SIGTERM)
except:
pass
pid = os.getpid()
f = open(LOCK, "w")
f.write("%d"%(pid))
f.close()
def now():
return str(datetime.now()) + " "
print now() + "Initializing..."
def iszhaopin(s):
keywords = [(u"招聘", ),
(u"诚聘", ),
(u"诚招", ),
(u"新职位", ),
(u"急聘", ),
# (u"需要", u"人员"),
(u"招人", ),
(u"招", u"人员"),
# (u"挖角", ),
(u"急招", ),
(u"伯乐奖", ),
(u"招兵买马", ),
(u"发送简历", ),
(u"发简历", ),
(u"email简历", ),
(u"岗位", u"空缺"),
(u"职位", u"名"),
(u"推荐", u"人才"),
(u"荐才", u"注明应聘"),
(u"内推", u"实习生"),
(u"内部推荐", u"精英"),
(u"换工作", u"高手"),
(u"换跑道", u"千里马"),
(u"欢迎加入我们", ),
(u"兼职招聘", ),
(u"创业招聘", ),
]
declinekeywords = [(u"智联招聘", ),
(u"寻人启事", ),
(r"//@", ),
]
match = False
for keywordset in keywords:
match2 = True
for key in keywordset:
if key not in s:
match2 = False
break
if match2:
match = True
break
if not match:
return False
for keywordset in declinekeywords:
match = True
for key in keywordset:
if key not in s:
match = False
break
if match:
return False
return True
class SinaFetch():
consumer_key= "961495784"
consumer_secret ="47d9d806a1dc04cc758be6f7213465bc"
def __init__(self):
""" constructor """
def getAtt(self, key):
try:
return self.obj.__getattribute__(key)
except Exception, e:
#print e
return ''
def getAttValue(self, obj, key):
try:
return obj.__getattribute__(key)
except Exception, e:
print e
return ''
def setToken(self, token, tokenSecret):
self.auth = OAuthHandler(self.consumer_key, self.consumer_secret)
self.auth.setToken(token, tokenSecret)
self.api = API(self.auth)
def auth(self):
self.auth = OAuthHandler(self.consumer_key, self.consumer_secret)
auth_url = self.auth.get_authorization_url()
print 'Please authorize: ' + auth_url
verifier = raw_input('PIN: ').strip()
self.auth.get_access_token(verifier)
self.api = API(self.auth)
def friends_timeline(self, page):
timeline = self.api.friends_timeline(count=200, page=page)
results = []
for line in timeline:
self.obj = line
mid = self.getAtt("id")
text = unicode(self.getAtt("text"))
posttime = self.getAtt("created_at")
source = self.getAtt("source")
user = self.getAtt("user")
try:
thumbnail = self.getAtt("thumbnail_pic")
if thumbnail[:7] != "http://":
thumbnail = ""
except:
thumbnail = ""
self.obj = user
userid = self.getAtt("id")
name = unicode(self.getAtt("screen_name"))
avatar = self.getAtt("profile_image_url")
if iszhaopin(text):
results += [(userid, name, avatar, mid, text, posttime, source, thumbnail)]
return results
q = Queue()
def working():
global B
cateid, crawlerinfo = q.get()
test = SinaFetch()
test.setToken(crawlerinfo[1], crawlerinfo[2])
for page in range(START, PAGE + START):
while True:
try:
result = test.friends_timeline(page)
break
except:
print now() + "Crawler %s Cate:%d page %d/%d Failed, Retrying..." % (crawlerinfo[0], cateid, page, START + PAGE - 1)
B += [(cateid, result)]
print now() + "Crawler %s Cate:%d page %d/%d Done." % (crawlerinfo[0], cateid, page, START + PAGE - 1)
sleep(0.2)
q.task_done()
for crawler in A:
q.put(crawler)
t = Thread(target=working)
t.setDaemon(True)
t.start()
sleep(0.2)
print now() + "Preparing cursors to operate database..."
path = '/var/www/0f523140-f3b3-4653-89b0-eb08c39940ad/src/crawler'
#path = os.path.dirname(sys.argv[0])
os.chdir(path)
import MySQLdb, uuid
db = MySQLdb.connect("205.185.126.152","apis","G2WvPRsxGEr77wEd","apis",charset="utf8")
c = db.cursor()
#_tagid = open("tag_list_withid.dict", "r").read().decode("utf-8").split('\n')
c.execute("SELECT * FROM tags")
tagid = {}
tagnoid = []
for i in c:
tag_id, tag = i[0], i[1]
tagnoid += [tag]
tagid[tag] = tag_id
f = open("tag_list_nogroup.dict", "w")
f.write('\n'.join(tagnoid))
f.close()
#Disabled temperarly
#d = detect()
#for line in _tagid:
# tag_id, tag = line.split()
# tagid[tag] = tag_id
print now() + "Dealing with pending tweets..."
c.execute("SELECT * FROM pending_tweets LIMIT 0 , 1")
while True:
try:
tweet_site_id, post_screenname, profile_image_url, source, post_datetime, content, type_, user_site_id, tweet_id, site_id, thumbnail = c.fetchone()
c.execute("DELETE FROM pending_tweets WHERE tweet_id = %s", (tweet_id,))
c.execute("SELECT * FROM tweets WHERE site_id = %s AND tweet_site_id = %s", (site_id, tweet_site_id))
if c.fetchone() != None:
print now() + "Dulplicate pending item:", tweet_site_id
c.execute("SELECT * FROM pending_tweets LIMIT 0 , 1")
continue
c.execute("""INSERT INTO tweets (
site_id, tweet_id, user_site_id, content, post_datetime,
type, tweet_site_id, favorite_count, application_count,
post_screenname, profile_image_url, source, thumbnail)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""",
(site_id, tweet_id, user_site_id, content, post_datetime,
type_, tweet_site_id, 0, 0,
post_screenname, profile_image_url, source, thumbnail))
c.execute("""INSERT INTO cat_relationship (
tweet_id, cat_id)
VALUES (%s, %s)""",
(tweet_id, 0,))
#for tag in d.Split(content)[:]:
for tag in tagnoid:
if tag.lower() not in content.lower():
continue
try:
c.execute("""INSERT INTO tag_relationship (
tag_id, tweet_id)
VALUES (%s, %s)""",
(tagid[tag], tweet_id))
c.execute("SELECT count, tag_group FROM tags WHERE tag_id = %s", (tagid[tag],))
t = c.fetchone()
if t == None:
print now() + "Error updating count: No tag %s found!" % (tag, )
else:
count = t[0] + 1
tag_group = t[1]
if tag_group != 0:
#print tag_group, "Tag group detected!"
c.execute("UPDATE tags SET count = %s WHERE tag_group = %s", (count, tag_group))
else:
c.execute("UPDATE tags SET count = %s WHERE tag_id = %s", (count, tagid[tag]))
except KeyError:
print now() + "Error updating tag: No tag %s found!" % (tag, )
print now() + "Inserted pending item:", tweet_site_id
c.execute("SELECT * FROM pending_tweets LIMIT 0 , 1")
except:
break
q.join()
print now() + "Craw Complete."
for cat, items in B:
for userid, name, avatar, mid, text, posttime, source, thumbnail in items:
tweet_id = uuid.uuid4().hex
c.execute("SELECT * FROM tweets WHERE tweet_site_id = %s", (mid,))
if c.fetchone() != None:
print now() + "Dulplicate item: %d, %d" % (cat, mid)
continue
c.execute("""INSERT INTO tweets (
site_id, tweet_id, user_site_id, content, post_datetime,
type, tweet_site_id, favorite_count, application_count,
post_screenname, profile_image_url, source, thumbnail)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""",
(1, tweet_id, userid, text, posttime,
2, mid, 0, 0,
name, avatar, source, thumbnail))
c.execute("""INSERT INTO cat_relationship (
cat_id, tweet_id)
VALUES (%s, %s)""",
(cat, tweet_id))
#for tag in d.Split(text)[:]:
for tag in tagnoid:
if tag.lower() not in text.lower():
continue
try:
c.execute("""INSERT INTO tag_relationship (
tag_id, tweet_id)
VALUES (%s, %s)""",
(tagid[tag], tweet_id))
c.execute("SELECT count, tag_group FROM tags WHERE tag_id = %s", (tagid[tag],))
t = c.fetchone()
if t == None:
print now() + "Error updating count: No tag %s found!" % (tag, )
else:
count = t[0] + 1
tag_group = t[1]
if tag_group != 0:
#print tag_group, "Tag group detected!"
c.execute("UPDATE tags SET count = %s WHERE tag_group = %s", (count, tag_group))
else:
c.execute("UPDATE tags SET count = %s WHERE tag_id = %s", (count, tagid[tag]))
except KeyError:
print now() + "Error updating tag: No tag %s found!" % (tag, )
c.execute("SELECT count FROM categories WHERE cat_id = %s", (cat,))
t = c.fetchone()
if t == None:
print now() + "Error updating count: No category %d found!" % (cat, )
else:
count = t[0] + 1
c.execute("UPDATE categories SET count = %s WHERE cat_id = %s", (count, cat))
print now() + "Inserted item: %d, %d" % (cat, mid)
#counting
c.execute("SELECT COUNT(*) FROM tweets WHERE post_datetime > %s", (datetime.combine(date.today(), time()),))
t = c.fetchone()
if t == None:
count = 0
else:
count = t[0]
c.execute("UPDATE counts SET count = %s WHERE type = %s", (count, "tweets_today"))
c.execute("SELECT COUNT(*) FROM tweets WHERE post_datetime > %s", (datetime.combine(date.today(), time()) - timedelta(days = datetime.now().isoweekday() - 1),))
t = c.fetchone()
if t == None:
count = 0
else:
count = t[0]
c.execute("UPDATE counts SET count = %s WHERE type = %s", (count, "tweets_thisweek"))
db.commit()
c.close()
print now() + "Wrote Database."
os.unlink(LOCK)
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/.svn/text-base/sina.py.svn-base | Python | gpl3 | 12,022 |
#!/usr/bin/env python
#coding=utf-8
catelist = [
(1, u"传统网络Internet"),
(2, u"移动互联"),
(3, u"网游"),
(4, u"电子商务_B2C/团购"),
(5, u"软件、电信"),
(6, u"新媒体"),
(7, u"风投/投行"),
(8, u"其他外企"),
]
idlist = [
[1, (u"超超Sandy", "d11c25990634d0e486235f1b42a55f9f", "89859ba49065135017b894df5e5a9089")],
[1, (u"传统网络2", "9257d982dcbc26d21fa4f0afb16a54be", "e99c1ae713e14edc3ec3abb7e2344be3")],
[2, (u"冬冬Billy", "f6449dd703d66cf2be5274f321416958", "31c47db4cd79e43a9196871a554d0847")],
[2, (u"新潮-独", "e17cec5e79cd81704aa4b73d15caf639", "983582e2b4b880cc35caa7ac38ce3449")],
[2, (u"移动互联2", "6193a010668f5dcc106e671babf4fbe1", "605e4449590b2c3d96d34b049f96fdbd")],
[3, (u"田田July", "032ec596fa363aa9bd3e5e5917f6aea4", "9e0c243fa3ff3515765510ba4010c411")],
[3, (u"网游2", "743700d7ec385d0b740ecc9a4ef519d4", "b89c6d406e235ab3c49ccea1d82b5622")],
[4, (u"田田Lily", "3ef7fc951a66918dd1cd722485fe1686", "74f524fe376ce995703e73e63407684f")],
[4, (u"电子商务临2", "669001d16b1641a2138d529b435eaefb", "13f58a73995fd2b80bc0aa875ad363f0")],
[5, (u"小朱Linda", "0c10534f393fe08451edb140e3b1150d", "423fd333a2542dbf6e2a38119a6e7e04")],
[5, (u"软件电信2", "f577ad7699dc1a74330bc41329c2ce71", "20cc173dbb46a6784588767e71de03ef")],
[6, (u"小王trueman", "1f8f7db82cdbc346a91840cef2bc1cb9", "a16ead9ee3b6b3f43e601de127275ddc")],
[6, (u"新媒体2", "fc565ccfa32bdb962becc8d49a5a37d3", "8504469c6cad83cde0998299aca8b2fa")],
[7, (u"小毕Simon", "4151efe34301f5fddb9d34fc72e5f4a4", "dc4a07e8b7936d688726604a7442e4bc")],
[7, (u"风投2", "b14cbaaae5e46079770ea77feeaa0c91", "2dd7a1e5bb6036d69b2c983aa3f2a682")],
[8, (u"小黄Lily", "8ee871ac7d18e0141b54077fefd58af6", "dc5cda5a9a4ab5c5a5cd53f85f1f7915")],
[8, (u"外企名企2", "6712203ce54da88930f72014a0ef90bd", "d97779c02d60cacbabd0c398cb8acd93")],
]
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/.svn/text-base/crawler_id.py.svn-base | Python | gpl3 | 2,109 |
from pymining.segmenter import Segmenter
from pymining.configuration import Configuration
class detect:
def __init__(self):
self.cfg = Configuration.FromFile("pymining/conf/test.xml")
self.segmenter = Segmenter(self.cfg, "segmenter")
def Split(self, line):
wordList = self.segmenter.Split(line)
return wordList
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/tag_detect.py | Python | gpl3 | 364 |
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from urllib2 import Request, urlopen
import base64
from weibopy import oauth
from weibopy.error import WeibopError
from weibopy.api import API
class AuthHandler(object):
def apply_auth(self, url, method, headers, parameters):
"""Apply authentication headers to request"""
raise NotImplementedError
def get_username(self):
"""Return the username of the authenticated user"""
raise NotImplementedError
class BasicAuthHandler(AuthHandler):
def __init__(self, username, password):
self.username = username
self._b64up = base64.b64encode('%s:%s' % (username, password))
def apply_auth(self, url, method, headers, parameters):
headers['Authorization'] = 'Basic %s' % self._b64up
def get_username(self):
return self.username
class OAuthHandler(AuthHandler):
"""OAuth authentication handler"""
OAUTH_HOST = 'api.t.sina.com.cn'
OAUTH_ROOT = '/oauth/'
def __init__(self, consumer_key, consumer_secret, callback=None, secure=False):
self._consumer = oauth.OAuthConsumer(consumer_key, consumer_secret)
self._sigmethod = oauth.OAuthSignatureMethod_HMAC_SHA1()
self.request_token = None
self.access_token = None
self.callback = callback
self.username = None
self.secure = secure
def _get_oauth_url(self, endpoint):
if self.secure:
prefix = 'https://'
else:
prefix = 'http://'
return prefix + self.OAUTH_HOST + self.OAUTH_ROOT + endpoint
def apply_auth(self, url, method, headers, parameters):
request = oauth.OAuthRequest.from_consumer_and_token(
self._consumer, http_url=url, http_method=method,
token=self.access_token, parameters=parameters
)
request.sign_request(self._sigmethod, self._consumer, self.access_token)
headers.update(request.to_header())
def _get_request_token(self):
try:
url = self._get_oauth_url('request_token')
request = oauth.OAuthRequest.from_consumer_and_token(
self._consumer, http_url=url, callback=self.callback
)
request.sign_request(self._sigmethod, self._consumer, None)
resp = urlopen(Request(url, headers=request.to_header()))
return oauth.OAuthToken.from_string(resp.read())
except Exception, e:
raise WeibopError(e)
def set_request_token(self, key, secret):
self.request_token = oauth.OAuthToken(key, secret)
def set_access_token(self, key, secret):
self.access_token = oauth.OAuthToken(key, secret)
def get_authorization_url(self, signin_with_twitter=False):
"""Get the authorization URL to redirect the user"""
try:
# get the request token
self.request_token = self._get_request_token()
# build auth request and return as url
if signin_with_twitter:
url = self._get_oauth_url('authenticate')
else:
url = self._get_oauth_url('authorize')
request = oauth.OAuthRequest.from_token_and_callback(
token=self.request_token, http_url=url
)
return request.to_url()
except Exception, e:
raise WeibopError(e)
def get_access_token(self, verifier=None):
"""
After user has authorized the request token, get access token
with user supplied verifier.
"""
try:
url = self._get_oauth_url('access_token')
# build request
request = oauth.OAuthRequest.from_consumer_and_token(
self._consumer,
token=self.request_token, http_url=url,
verifier=str(verifier)
)
request.sign_request(self._sigmethod, self._consumer, self.request_token)
# send request
resp = urlopen(Request(url, headers=request.to_header()))
self.access_token = oauth.OAuthToken.from_string(resp.read())
print 'Access token key: '+ str(self.access_token.key)
print 'Access token secret: '+ str(self.access_token.secret)
return self.access_token
except Exception, e:
raise WeibopError(e)
def setToken(self, token, tokenSecret):
self.access_token = oauth.OAuthToken(token, tokenSecret)
def get_username(self):
if self.username is None:
api = API(self)
user = api.verify_credentials()
if user:
self.username = user.screen_name
else:
raise WeibopError("Unable to get username, invalid oauth token!")
return self.username | 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/weibopy/auth.py | Python | gpl3 | 4,904 |
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
class WeibopError(Exception):
"""Weibopy exception"""
def __init__(self, reason):
self.reason = reason.encode('utf-8')
def __str__(self):
return self.reason
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/weibopy/error.py | Python | gpl3 | 256 |
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from weibopy.utils import parse_datetime, parse_html_value, parse_a_href, \
parse_search_datetime, unescape_html
class ResultSet(list):
"""A list like object that holds results from a Twitter API query."""
class Model(object):
def __init__(self, api=None):
self._api = api
def __getstate__(self):
# pickle
pickle = dict(self.__dict__)
del pickle['_api'] # do not pickle the API reference
return pickle
@classmethod
def parse(cls, api, json):
"""Parse a JSON object into a model instance."""
raise NotImplementedError
@classmethod
def parse_list(cls, api, json_list):
"""Parse a list of JSON objects into a result set of model instances."""
results = ResultSet()
for obj in json_list:
results.append(cls.parse(api, obj))
return results
class Status(Model):
@classmethod
def parse(cls, api, json):
status = cls(api)
for k, v in json.items():
if k == 'user':
user = User.parse(api, v)
setattr(status, 'author', user)
setattr(status, 'user', user) # DEPRECIATED
elif k == 'screen_name':
setattr(status, k, v)
elif k == 'created_at':
setattr(status, k, parse_datetime(v))
elif k == 'source':
if '<' in v:
setattr(status, k, parse_html_value(v))
setattr(status, 'source_url', parse_a_href(v))
else:
setattr(status, k, v)
elif k == 'retweeted_status':
setattr(status, k, User.parse(api, v))
elif k == 'geo':
setattr(status, k, Geo.parse(api, v))
else:
setattr(status, k, v)
return status
def destroy(self):
return self._api.destroy_status(self.id)
def retweet(self):
return self._api.retweet(self.id)
def retweets(self):
return self._api.retweets(self.id)
def favorite(self):
return self._api.create_favorite(self.id)
class Geo(Model):
@classmethod
def parse(cls, api, json):
geo = cls(api)
if json is not None:
for k, v in json.items():
setattr(geo, k, v)
return geo
class Comments(Model):
@classmethod
def parse(cls, api, json):
comments = cls(api)
for k, v in json.items():
if k == 'user':
user = User.parse(api, v)
setattr(comments, 'author', user)
setattr(comments, 'user', user)
elif k == 'status':
status = Status.parse(api, v)
setattr(comments, 'user', status)
elif k == 'created_at':
setattr(comments, k, parse_datetime(v))
elif k == 'reply_comment':
setattr(comments, k, User.parse(api, v))
else:
setattr(comments, k, v)
return comments
def destroy(self):
return self._api.destroy_status(self.id)
def retweet(self):
return self._api.retweet(self.id)
def retweets(self):
return self._api.retweets(self.id)
def favorite(self):
return self._api.create_favorite(self.id)
class User(Model):
@classmethod
def parse(cls, api, json):
user = cls(api)
for k, v in json.items():
if k == 'created_at':
setattr(user, k, parse_datetime(v))
elif k == 'status':
setattr(user, k, Status.parse(api, v))
elif k == 'screen_name':
setattr(user, k, v)
elif k == 'following':
# twitter sets this to null if it is false
if v is True:
setattr(user, k, True)
else:
setattr(user, k, False)
else:
setattr(user, k, v)
return user
@classmethod
def parse_list(cls, api, json_list):
if isinstance(json_list, list):
item_list = json_list
else:
item_list = json_list['users']
results = ResultSet()
for obj in item_list:
results.append(cls.parse(api, obj))
return results
def timeline(self, **kargs):
return self._api.user_timeline(user_id=self.id, **kargs)
def friends(self, **kargs):
return self._api.friends(user_id=self.id, **kargs)
def followers(self, **kargs):
return self._api.followers(user_id=self.id, **kargs)
def follow(self):
self._api.create_friendship(user_id=self.id)
self.following = True
def unfollow(self):
self._api.destroy_friendship(user_id=self.id)
self.following = False
def lists_memberships(self, *args, **kargs):
return self._api.lists_memberships(user=self.screen_name, *args, **kargs)
def lists_subscriptions(self, *args, **kargs):
return self._api.lists_subscriptions(user=self.screen_name, *args, **kargs)
def lists(self, *args, **kargs):
return self._api.lists(user=self.screen_name, *args, **kargs)
def followers_ids(self, *args, **kargs):
return self._api.followers_ids(user_id=self.id, *args, **kargs)
class DirectMessage(Model):
@classmethod
def parse(cls, api, json):
dm = cls(api)
for k, v in json.items():
if k == 'sender' or k == 'recipient':
setattr(dm, k, User.parse(api, v))
elif k == 'created_at':
setattr(dm, k, parse_datetime(v))
else:
setattr(dm, k, v)
return dm
class Friendship(Model):
@classmethod
def parse(cls, api, json):
source = cls(api)
for k, v in json['source'].items():
setattr(source, k, v)
# parse target
target = cls(api)
for k, v in json['target'].items():
setattr(target, k, v)
return source, target
class SavedSearch(Model):
@classmethod
def parse(cls, api, json):
ss = cls(api)
for k, v in json.items():
if k == 'created_at':
setattr(ss, k, parse_datetime(v))
else:
setattr(ss, k, v)
return ss
def destroy(self):
return self._api.destroy_saved_search(self.id)
class SearchResult(Model):
@classmethod
def parse(cls, api, json):
result = cls()
for k, v in json.items():
if k == 'created_at':
setattr(result, k, parse_search_datetime(v))
elif k == 'source':
setattr(result, k, parse_html_value(unescape_html(v)))
else:
setattr(result, k, v)
return result
@classmethod
def parse_list(cls, api, json_list, result_set=None):
results = ResultSet()
results.max_id = json_list.get('max_id')
results.since_id = json_list.get('since_id')
results.refresh_url = json_list.get('refresh_url')
results.next_page = json_list.get('next_page')
results.results_per_page = json_list.get('results_per_page')
results.page = json_list.get('page')
results.completed_in = json_list.get('completed_in')
results.query = json_list.get('query')
for obj in json_list['results']:
results.append(cls.parse(api, obj))
return results
class List(Model):
@classmethod
def parse(cls, api, json):
lst = List(api)
for k,v in json.items():
if k == 'user':
setattr(lst, k, User.parse(api, v))
else:
setattr(lst, k, v)
return lst
@classmethod
def parse_list(cls, api, json_list, result_set=None):
results = ResultSet()
for obj in json_list['lists']:
results.append(cls.parse(api, obj))
return results
def update(self, **kargs):
return self._api.update_list(self.slug, **kargs)
def destroy(self):
return self._api.destroy_list(self.slug)
def timeline(self, **kargs):
return self._api.list_timeline(self.user.screen_name, self.slug, **kargs)
def add_member(self, id):
return self._api.add_list_member(self.slug, id)
def remove_member(self, id):
return self._api.remove_list_member(self.slug, id)
def members(self, **kargs):
return self._api.list_members(self.user.screen_name, self.slug, **kargs)
def is_member(self, id):
return self._api.is_list_member(self.user.screen_name, self.slug, id)
def subscribe(self):
return self._api.subscribe_list(self.user.screen_name, self.slug)
def unsubscribe(self):
return self._api.unsubscribe_list(self.user.screen_name, self.slug)
def subscribers(self, **kargs):
return self._api.list_subscribers(self.user.screen_name, self.slug, **kargs)
def is_subscribed(self, id):
return self._api.is_subscribed_list(self.user.screen_name, self.slug, id)
class JSONModel(Model):
@classmethod
def parse(cls, api, json):
lst = JSONModel(api)
for k,v in json.items():
setattr(lst, k, v)
return lst
class IDSModel(Model):
@classmethod
def parse(cls, api, json):
ids = IDSModel(api)
for k, v in json.items():
setattr(ids, k, v)
return ids
class Counts(Model):
@classmethod
def parse(cls, api, json):
ids = Counts(api)
for k, v in json.items():
setattr(ids, k, v)
return ids
class ModelFactory(object):
"""
Used by parsers for creating instances
of models. You may subclass this factory
to add your own extended models.
"""
status = Status
comments = Comments
user = User
direct_message = DirectMessage
friendship = Friendship
saved_search = SavedSearch
search_result = SearchResult
list = List
json = JSONModel
ids_list = IDSModel
counts = Counts
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/weibopy/models.py | Python | gpl3 | 10,222 |
"""
The MIT License
Copyright (c) 2007 Leah Culver
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""
import cgi
import urllib
import time
import random
import urlparse
import hmac
import binascii
VERSION = '1.0' # Hi Blaine!
HTTP_METHOD = 'GET'
SIGNATURE_METHOD = 'PLAINTEXT'
class OAuthError(RuntimeError):
"""Generic exception class."""
def __init__(self, message='OAuth error occured.'):
self.message = message
def build_authenticate_header(realm=''):
"""Optional WWW-Authenticate header (401 error)"""
return {'WWW-Authenticate': 'OAuth realm="%s"' % realm}
def escape(s):
"""Escape a URL including any /."""
return urllib.quote(s, safe='~')
def _utf8_str(s):
"""Convert unicode to utf-8."""
if isinstance(s, unicode):
return s.encode("utf-8")
else:
return str(s)
def generate_timestamp():
"""Get seconds since epoch (UTC)."""
return int(time.time())
def generate_nonce(length=8):
"""Generate pseudorandom number."""
return ''.join([str(random.randint(0, 9)) for i in range(length)])
def generate_verifier(length=8):
"""Generate pseudorandom number."""
return ''.join([str(random.randint(0, 9)) for i in range(length)])
class OAuthConsumer(object):
"""Consumer of OAuth authentication.
OAuthConsumer is a data type that represents the identity of the Consumer
via its shared secret with the Service Provider.
"""
key = None
secret = None
def __init__(self, key, secret):
self.key = key
self.secret = secret
class OAuthToken(object):
"""OAuthToken is a data type that represents an End User via either an access
or request token.
key -- the token
secret -- the token secret
"""
key = None
secret = None
callback = None
callback_confirmed = None
verifier = None
def __init__(self, key, secret):
self.key = key
self.secret = secret
def set_callback(self, callback):
self.callback = callback
self.callback_confirmed = 'true'
def set_verifier(self, verifier=None):
if verifier is not None:
self.verifier = verifier
else:
self.verifier = generate_verifier()
def get_callback_url(self):
if self.callback and self.verifier:
# Append the oauth_verifier.
parts = urlparse.urlparse(self.callback)
scheme, netloc, path, params, query, fragment = parts[:6]
if query:
query = '%s&oauth_verifier=%s' % (query, self.verifier)
else:
query = 'oauth_verifier=%s' % self.verifier
return urlparse.urlunparse((scheme, netloc, path, params,
query, fragment))
return self.callback
def to_string(self):
data = {
'oauth_token': self.key,
'oauth_token_secret': self.secret,
}
if self.callback_confirmed is not None:
data['oauth_callback_confirmed'] = self.callback_confirmed
return urllib.urlencode(data)
def from_string(s):
""" Returns a token from something like:
oauth_token_secret=xxx&oauth_token=xxx
"""
params = cgi.parse_qs(s, keep_blank_values=False)
key = params['oauth_token'][0]
secret = params['oauth_token_secret'][0]
token = OAuthToken(key, secret)
try:
token.callback_confirmed = params['oauth_callback_confirmed'][0]
except KeyError:
pass # 1.0, no callback confirmed.
return token
from_string = staticmethod(from_string)
def __str__(self):
return self.to_string()
class OAuthRequest(object):
"""OAuthRequest represents the request and can be serialized.
OAuth parameters:
- oauth_consumer_key
- oauth_token
- oauth_signature_method
- oauth_signature
- oauth_timestamp
- oauth_nonce
- oauth_version
- oauth_verifier
... any additional parameters, as defined by the Service Provider.
"""
parameters = None # OAuth parameters.
http_method = HTTP_METHOD
http_url = None
version = VERSION
def __init__(self, http_method=HTTP_METHOD, http_url=None, parameters=None):
self.http_method = http_method
self.http_url = http_url
self.parameters = parameters or {}
def set_parameter(self, parameter, value):
self.parameters[parameter] = value
def get_parameter(self, parameter):
try:
return self.parameters[parameter]
except:
raise OAuthError('Parameter not found: %s' % parameter)
def _get_timestamp_nonce(self):
return self.get_parameter('oauth_timestamp'), self.get_parameter(
'oauth_nonce')
def get_nonoauth_parameters(self):
"""Get any non-OAuth parameters."""
parameters = {}
for k, v in self.parameters.iteritems():
# Ignore oauth parameters.
if k.find('oauth_') < 0:
parameters[k] = v
return parameters
def to_header(self, realm=''):
"""Serialize as a header for an HTTPAuth request."""
auth_header = 'OAuth realm="%s"' % realm
# Add the oauth parameters.
if self.parameters:
for k, v in self.parameters.iteritems():
if k[:6] == 'oauth_':
auth_header += ', %s="%s"' % (k, escape(str(v)))
return {'Authorization': auth_header}
def to_postdata(self):
"""Serialize as post data for a POST request."""
return '&'.join(['%s=%s' % (escape(str(k)), escape(str(v))) \
for k, v in self.parameters.iteritems()])
def to_url(self):
"""Serialize as a URL for a GET request."""
return '%s?%s' % (self.get_normalized_http_url(), self.to_postdata())
def get_normalized_parameters(self):
"""Return a string that contains the parameters that must be signed."""
params = self.parameters
try:
# Exclude the signature if it exists.
del params['oauth_signature']
except:
pass
# Escape key values before sorting.
key_values = [(escape(_utf8_str(k)), escape(_utf8_str(v))) \
for k,v in params.items()]
# Sort lexicographically, first after key, then after value.
key_values.sort()
# Combine key value pairs into a string.
return '&'.join(['%s=%s' % (k, v) for k, v in key_values])
def get_normalized_http_method(self):
"""Uppercases the http method."""
return self.http_method.upper()
def get_normalized_http_url(self):
"""Parses the URL and rebuilds it to be scheme://host/path."""
parts = urlparse.urlparse(self.http_url)
scheme, netloc, path = parts[:3]
# Exclude default port numbers.
if scheme == 'http' and netloc[-3:] == ':80':
netloc = netloc[:-3]
elif scheme == 'https' and netloc[-4:] == ':443':
netloc = netloc[:-4]
return '%s://%s%s' % (scheme, netloc, path)
def sign_request(self, signature_method, consumer, token):
"""Set the signature parameter to the result of build_signature."""
# Set the signature method.
self.set_parameter('oauth_signature_method',
signature_method.get_name())
# Set the signature.
self.set_parameter('oauth_signature',self.build_signature(signature_method, consumer, token))
def build_signature(self, signature_method, consumer, token):
"""Calls the build signature method within the signature method."""
return signature_method.build_signature(self, consumer, token)
def from_request(http_method, http_url, headers=None, parameters=None,
query_string=None):
"""Combines multiple parameter sources."""
if parameters is None:
parameters = {}
# Headers
if headers and 'Authorization' in headers:
auth_header = headers['Authorization']
# Check that the authorization header is OAuth.
if auth_header[:6] == 'OAuth ':
auth_header = auth_header[6:]
try:
# Get the parameters from the header.
header_params = OAuthRequest._split_header(auth_header)
parameters.update(header_params)
except:
raise OAuthError('Unable to parse OAuth parameters from '
'Authorization header.')
# GET or POST query string.
if query_string:
query_params = OAuthRequest._split_url_string(query_string)
parameters.update(query_params)
# URL parameters.
param_str = urlparse.urlparse(http_url)[4] # query
url_params = OAuthRequest._split_url_string(param_str)
parameters.update(url_params)
if parameters:
return OAuthRequest(http_method, http_url, parameters)
return None
from_request = staticmethod(from_request)
def from_consumer_and_token(oauth_consumer, token=None,
callback=None, verifier=None, http_method=HTTP_METHOD,
http_url=None, parameters=None):
if not parameters:
parameters = {}
defaults = {
'oauth_consumer_key': oauth_consumer.key,
'oauth_timestamp': generate_timestamp(),
'oauth_nonce': generate_nonce(),
'oauth_version': OAuthRequest.version,
}
defaults.update(parameters)
parameters = defaults
if token:
parameters['oauth_token'] = token.key
if token.callback:
parameters['oauth_callback'] = token.callback
# 1.0a support for verifier.
if verifier:
parameters['oauth_verifier'] = verifier
elif callback:
# 1.0a support for callback in the request token request.
parameters['oauth_callback'] = callback
return OAuthRequest(http_method, http_url, parameters)
from_consumer_and_token = staticmethod(from_consumer_and_token)
def from_token_and_callback(token, callback=None, http_method=HTTP_METHOD,
http_url=None, parameters=None):
if not parameters:
parameters = {}
parameters['oauth_token'] = token.key
if callback:
parameters['oauth_callback'] = callback
return OAuthRequest(http_method, http_url, parameters)
from_token_and_callback = staticmethod(from_token_and_callback)
def _split_header(header):
"""Turn Authorization: header into parameters."""
params = {}
parts = header.split(',')
for param in parts:
# Ignore realm parameter.
if param.find('realm') > -1:
continue
# Remove whitespace.
param = param.strip()
# Split key-value.
param_parts = param.split('=', 1)
# Remove quotes and unescape the value.
params[param_parts[0]] = urllib.unquote(param_parts[1].strip('\"'))
return params
_split_header = staticmethod(_split_header)
def _split_url_string(param_str):
"""Turn URL string into parameters."""
parameters = cgi.parse_qs(param_str, keep_blank_values=False)
for k, v in parameters.iteritems():
parameters[k] = urllib.unquote(v[0])
return parameters
_split_url_string = staticmethod(_split_url_string)
class OAuthServer(object):
"""A worker to check the validity of a request against a data store."""
timestamp_threshold = 300 # In seconds, five minutes.
version = VERSION
signature_methods = None
data_store = None
def __init__(self, data_store=None, signature_methods=None):
self.data_store = data_store
self.signature_methods = signature_methods or {}
def set_data_store(self, data_store):
self.data_store = data_store
def get_data_store(self):
return self.data_store
def add_signature_method(self, signature_method):
self.signature_methods[signature_method.get_name()] = signature_method
return self.signature_methods
def fetch_request_token(self, oauth_request):
"""Processes a request_token request and returns the
request token on success.
"""
try:
# Get the request token for authorization.
token = self._get_token(oauth_request, 'request')
except OAuthError:
# No token required for the initial token request.
version = self._get_version(oauth_request)
consumer = self._get_consumer(oauth_request)
try:
callback = self.get_callback(oauth_request)
except OAuthError:
callback = None # 1.0, no callback specified.
self._check_signature(oauth_request, consumer, None)
# Fetch a new token.
token = self.data_store.fetch_request_token(consumer, callback)
return token
def fetch_access_token(self, oauth_request):
"""Processes an access_token request and returns the
access token on success.
"""
version = self._get_version(oauth_request)
consumer = self._get_consumer(oauth_request)
try:
verifier = self._get_verifier(oauth_request)
except OAuthError:
verifier = None
# Get the request token.
token = self._get_token(oauth_request, 'request')
self._check_signature(oauth_request, consumer, token)
new_token = self.data_store.fetch_access_token(consumer, token, verifier)
return new_token
def verify_request(self, oauth_request):
"""Verifies an api call and checks all the parameters."""
# -> consumer and token
version = self._get_version(oauth_request)
consumer = self._get_consumer(oauth_request)
# Get the access token.
token = self._get_token(oauth_request, 'access')
self._check_signature(oauth_request, consumer, token)
parameters = oauth_request.get_nonoauth_parameters()
return consumer, token, parameters
def authorize_token(self, token, user):
"""Authorize a request token."""
return self.data_store.authorize_request_token(token, user)
def get_callback(self, oauth_request):
"""Get the callback URL."""
return oauth_request.get_parameter('oauth_callback')
def build_authenticate_header(self, realm=''):
"""Optional support for the authenticate header."""
return {'WWW-Authenticate': 'OAuth realm="%s"' % realm}
def _get_version(self, oauth_request):
"""Verify the correct version request for this server."""
try:
version = oauth_request.get_parameter('oauth_version')
except:
version = VERSION
if version and version != self.version:
raise OAuthError('OAuth version %s not supported.' % str(version))
return version
def _get_signature_method(self, oauth_request):
"""Figure out the signature with some defaults."""
try:
signature_method = oauth_request.get_parameter(
'oauth_signature_method')
except:
signature_method = SIGNATURE_METHOD
try:
# Get the signature method object.
signature_method = self.signature_methods[signature_method]
except:
signature_method_names = ', '.join(self.signature_methods.keys())
raise OAuthError('Signature method %s not supported try one of the '
'following: %s' % (signature_method, signature_method_names))
return signature_method
def _get_consumer(self, oauth_request):
consumer_key = oauth_request.get_parameter('oauth_consumer_key')
consumer = self.data_store.lookup_consumer(consumer_key)
if not consumer:
raise OAuthError('Invalid consumer.')
return consumer
def _get_token(self, oauth_request, token_type='access'):
"""Try to find the token for the provided request token key."""
token_field = oauth_request.get_parameter('oauth_token')
token = self.data_store.lookup_token(token_type, token_field)
if not token:
raise OAuthError('Invalid %s token: %s' % (token_type, token_field))
return token
def _get_verifier(self, oauth_request):
return oauth_request.get_parameter('oauth_verifier')
def _check_signature(self, oauth_request, consumer, token):
timestamp, nonce = oauth_request._get_timestamp_nonce()
self._check_timestamp(timestamp)
self._check_nonce(consumer, token, nonce)
signature_method = self._get_signature_method(oauth_request)
try:
signature = oauth_request.get_parameter('oauth_signature')
except:
raise OAuthError('Missing signature.')
# Validate the signature.
valid_sig = signature_method.check_signature(oauth_request, consumer,
token, signature)
if not valid_sig:
key, base = signature_method.build_signature_base_string(
oauth_request, consumer, token)
raise OAuthError('Invalid signature. Expected signature base '
'string: %s' % base)
built = signature_method.build_signature(oauth_request, consumer, token)
def _check_timestamp(self, timestamp):
"""Verify that timestamp is recentish."""
timestamp = int(timestamp)
now = int(time.time())
lapsed = abs(now - timestamp)
if lapsed > self.timestamp_threshold:
raise OAuthError('Expired timestamp: given %d and now %s has a '
'greater difference than threshold %d' %
(timestamp, now, self.timestamp_threshold))
def _check_nonce(self, consumer, token, nonce):
"""Verify that the nonce is uniqueish."""
nonce = self.data_store.lookup_nonce(consumer, token, nonce)
if nonce:
raise OAuthError('Nonce already used: %s' % str(nonce))
class OAuthClient(object):
"""OAuthClient is a worker to attempt to execute a request."""
consumer = None
token = None
def __init__(self, oauth_consumer, oauth_token):
self.consumer = oauth_consumer
self.token = oauth_token
def get_consumer(self):
return self.consumer
def get_token(self):
return self.token
def fetch_request_token(self, oauth_request):
"""-> OAuthToken."""
raise NotImplementedError
def fetch_access_token(self, oauth_request):
"""-> OAuthToken."""
raise NotImplementedError
def access_resource(self, oauth_request):
"""-> Some protected resource."""
raise NotImplementedError
class OAuthDataStore(object):
"""A database abstraction used to lookup consumers and tokens."""
def lookup_consumer(self, key):
"""-> OAuthConsumer."""
raise NotImplementedError
def lookup_token(self, oauth_consumer, token_type, token_token):
"""-> OAuthToken."""
raise NotImplementedError
def lookup_nonce(self, oauth_consumer, oauth_token, nonce):
"""-> OAuthToken."""
raise NotImplementedError
def fetch_request_token(self, oauth_consumer, oauth_callback):
"""-> OAuthToken."""
raise NotImplementedError
def fetch_access_token(self, oauth_consumer, oauth_token, oauth_verifier):
"""-> OAuthToken."""
raise NotImplementedError
def authorize_request_token(self, oauth_token, user):
"""-> OAuthToken."""
raise NotImplementedError
class OAuthSignatureMethod(object):
"""A strategy class that implements a signature method."""
def get_name(self):
"""-> str."""
raise NotImplementedError
def build_signature_base_string(self, oauth_request, oauth_consumer, oauth_token):
"""-> str key, str raw."""
raise NotImplementedError
def build_signature(self, oauth_request, oauth_consumer, oauth_token):
"""-> str."""
raise NotImplementedError
def check_signature(self, oauth_request, consumer, token, signature):
built = self.build_signature(oauth_request, consumer, token)
return built == signature
class OAuthSignatureMethod_HMAC_SHA1(OAuthSignatureMethod):
def get_name(self):
return 'HMAC-SHA1'
def build_signature_base_string(self, oauth_request, consumer, token):
sig = (
escape(oauth_request.get_normalized_http_method()),
escape(oauth_request.get_normalized_http_url()),
escape(oauth_request.get_normalized_parameters()),
)
key = '%s&' % escape(consumer.secret)
if token:
key += escape(token.secret)
#print "OAuth base string:" + str(sig)
raw = '&'.join(sig)
return key, raw
def build_signature(self, oauth_request, consumer, token):
"""Builds the base signature string."""
key, raw = self.build_signature_base_string(oauth_request, consumer,
token)
# HMAC object.
try:
import hashlib # 2.5
hashed = hmac.new(key, raw, hashlib.sha1)
except:
import sha # Deprecated
hashed = hmac.new(key, raw, sha)
# Calculate the digest base 64.
return binascii.b2a_base64(hashed.digest())[:-1]
class OAuthSignatureMethod_PLAINTEXT(OAuthSignatureMethod):
def get_name(self):
return 'PLAINTEXT'
def build_signature_base_string(self, oauth_request, consumer, token):
"""Concatenates the consumer key and secret."""
sig = '%s&' % escape(consumer.secret)
if token:
sig = sig + escape(token.secret)
return sig, sig
def build_signature(self, oauth_request, consumer, token):
key, raw = self.build_signature_base_string(oauth_request, consumer,
token)
return key | 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/weibopy/oauth.py | Python | gpl3 | 23,187 |
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from weibopy.models import ModelFactory
from weibopy.utils import import_simplejson
from weibopy.error import WeibopError
class Parser(object):
def parse(self, method, payload):
"""
Parse the response payload and return the result.
Returns a tuple that contains the result data and the cursors
(or None if not present).
"""
raise NotImplementedError
def parse_error(self, method, payload):
"""
Parse the error message from payload.
If unable to parse the message, throw an exception
and default error message will be used.
"""
raise NotImplementedError
class JSONParser(Parser):
payload_format = 'json'
def __init__(self):
self.json_lib = import_simplejson()
def parse(self, method, payload):
try:
json = self.json_lib.loads(payload)
except Exception, e:
print "Failed to parse JSON payload:"+ str(payload)
raise WeibopError('Failed to parse JSON payload: %s' % e)
#if isinstance(json, dict) and 'previous_cursor' in json and 'next_cursor' in json:
# cursors = json['previous_cursor'], json['next_cursor']
# return json, cursors
#else:
return json
def parse_error(self, method, payload):
return self.json_lib.loads(payload)
class ModelParser(JSONParser):
def __init__(self, model_factory=None):
JSONParser.__init__(self)
self.model_factory = model_factory or ModelFactory
def parse(self, method, payload):
try:
if method.payload_type is None: return
model = getattr(self.model_factory, method.payload_type)
except AttributeError:
raise WeibopError('No model for this payload type: %s' % method.payload_type)
json = JSONParser.parse(self, method, payload)
if isinstance(json, tuple):
json, cursors = json
else:
cursors = None
if method.payload_list:
result = model.parse_list(method.api, json)
else:
result = model.parse(method.api, json)
if cursors:
return result, cursors
else:
return result
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/weibopy/parsers.py | Python | gpl3 | 2,316 |
# Copyright 2010 Joshua Roesslein
# See LICENSE for details.
from datetime import datetime
import time
import htmlentitydefs
import re
def parse_datetime(str):
# We must parse datetime this way to work in python 2.4
#return datetime(*(time.strptime(str, '%a %b %d %H:%M:%S +0800 %Y')[0:6]))
#Changed by Felix Yan
try:
a = time.strptime(str, '%a %b %d %H:%M:%S +0800 %Y')[0:6]
except:
print "Error: " + str
a = ""
if len(a)<6:
raise ValueError
else:
return datetime(*a)
def parse_html_value(html):
return html[html.find('>')+1:html.rfind('<')]
def parse_a_href(atag):
start = atag.find('"') + 1
end = atag.find('"', start)
return atag[start:end]
def parse_search_datetime(str):
# python 2.4
return datetime(*(time.strptime(str, '%a, %d %b %Y %H:%M:%S +0000')[0:6]))
def unescape_html(text):
"""Created by Fredrik Lundh (http://effbot.org/zone/re-sub.htm#unescape-html)"""
def fixup(m):
text = m.group(0)
if text[:2] == "&#":
# character reference
try:
if text[:3] == "&#x":
return unichr(int(text[3:-1], 16))
else:
return unichr(int(text[2:-1]))
except ValueError:
pass
else:
# named entity
try:
text = unichr(htmlentitydefs.name2codepoint[text[1:-1]])
except KeyError:
pass
return text # leave as is
return re.sub("&#?\w+;", fixup, text)
def convert_to_utf8_str(arg):
# written by Michael Norton (http://docondev.blogspot.com/)
if isinstance(arg, unicode):
arg = arg.encode('utf-8')
elif not isinstance(arg, str):
arg = str(arg)
return arg
def import_simplejson():
try:
import simplejson as json
except ImportError:
try:
import json # Python 2.6+
except ImportError:
try:
from django.utils import simplejson as json # Google App Engine
except ImportError:
raise ImportError, "Can't load a json library"
return json
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/weibopy/utils.py | Python | gpl3 | 2,209 |
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
import httplib
import urllib
import time
import re
from weibopy.error import WeibopError
from weibopy.utils import convert_to_utf8_str
re_path_template = re.compile('{\w+}')
def bind_api(**config):
class APIMethod(object):
path = config['path']
payload_type = config.get('payload_type', None)
payload_list = config.get('payload_list', False)
allowed_param = config.get('allowed_param', [])
method = config.get('method', 'GET')
require_auth = config.get('require_auth', False)
search_api = config.get('search_api', False)
def __init__(self, api, args, kargs):
# If authentication is required and no credentials
# are provided, throw an error.
if self.require_auth and not api.auth:
raise WeibopError('Authentication required!')
self.api = api
self.post_data = kargs.pop('post_data', None)
self.retry_count = kargs.pop('retry_count', api.retry_count)
self.retry_delay = kargs.pop('retry_delay', api.retry_delay)
self.retry_errors = kargs.pop('retry_errors', api.retry_errors)
self.headers = kargs.pop('headers', {})
self.build_parameters(args, kargs)
# Pick correct URL root to use
if self.search_api:
self.api_root = api.search_root
else:
self.api_root = api.api_root
# Perform any path variable substitution
self.build_path()
if api.secure:
self.scheme = 'https://'
else:
self.scheme = 'http://'
if self.search_api:
self.host = api.search_host
else:
self.host = api.host
# Manually set Host header to fix an issue in python 2.5
# or older where Host is set including the 443 port.
# This causes Twitter to issue 301 redirect.
# See Issue http://github.com/joshthecoder/tweepy/issues/#issue/12
self.headers['Host'] = self.host
def build_parameters(self, args, kargs):
self.parameters = {}
for idx, arg in enumerate(args):
try:
self.parameters[self.allowed_param[idx]] = convert_to_utf8_str(arg)
except IndexError:
raise WeibopError('Too many parameters supplied!')
for k, arg in kargs.items():
if arg is None:
continue
if k in self.parameters:
raise WeibopError('Multiple values for parameter %s supplied!' % k)
self.parameters[k] = convert_to_utf8_str(arg)
def build_path(self):
for variable in re_path_template.findall(self.path):
name = variable.strip('{}')
if name == 'user' and self.api.auth:
value = self.api.auth.get_username()
else:
try:
value = urllib.quote(self.parameters[name])
except KeyError:
raise WeibopError('No parameter value found for path variable: %s' % name)
del self.parameters[name]
self.path = self.path.replace(variable, value)
def execute(self):
# Build the request URL
url = self.api_root + self.path
if self.api.source is not None:
self.parameters.setdefault('source',self.api.source)
if len(self.parameters):
if self.method == 'GET':
url = '%s?%s' % (url, urllib.urlencode(self.parameters))
else:
self.headers.setdefault("User-Agent","python")
if self.post_data is None:
self.headers.setdefault("Accept","text/html")
self.headers.setdefault("Content-Type","application/x-www-form-urlencoded")
self.post_data = urllib.urlencode(self.parameters)
# Query the cache if one is available
# and this request uses a GET method.
if self.api.cache and self.method == 'GET':
cache_result = self.api.cache.get(url)
# if cache result found and not expired, return it
if cache_result:
# must restore api reference
if isinstance(cache_result, list):
for result in cache_result:
result._api = self.api
else:
cache_result._api = self.api
return cache_result
#urllib.urlencode(self.parameters)
# Continue attempting request until successful
# or maximum number of retries is reached.
sTime = time.time()
retries_performed = 0
while retries_performed < self.retry_count + 1:
# Open connection
# FIXME: add timeout
if self.api.secure:
conn = httplib.HTTPSConnection(self.host)
else:
conn = httplib.HTTPConnection(self.host)
# Apply authentication
if self.api.auth:
self.api.auth.apply_auth(
self.scheme + self.host + url,
self.method, self.headers, self.parameters
)
# Execute request
try:
conn.request(self.method, url, headers=self.headers, body=self.post_data)
resp = conn.getresponse()
except Exception, e:
raise WeibopError('Failed to send request: %s' % e + "url=" + str(url) +",self.headers="+ str(self.headers))
# Exit request loop if non-retry error code
if self.retry_errors:
if resp.status not in self.retry_errors: break
else:
if resp.status == 200: break
# Sleep before retrying request again
time.sleep(self.retry_delay)
retries_performed += 1
# If an error was returned, throw an exception
body = resp.read()
self.api.last_response = resp
if self.api.log is not None:
requestUrl = "URL:http://"+ self.host + url
eTime = '%.0f' % ((time.time() - sTime) * 1000)
postData = ""
if self.post_data is not None:
postData = ",post:"+ self.post_data[0:500]
self.api.log.debug(requestUrl +",time:"+ str(eTime)+ postData+",result:"+ body )
if resp.status != 200:
try:
json = self.api.parser.parse_error(self, body)
error_code = json['error_code']
error = json['error']
error_msg = 'error_code:' + error_code +','+ error
except Exception:
error_msg = "Twitter error response: status code = %s" % resp.status
raise WeibopError(error_msg)
# Parse the response payload
result = self.api.parser.parse(self, body)
conn.close()
# Store result into cache if one is available.
if self.api.cache and self.method == 'GET' and result:
self.api.cache.store(url, result)
return result
def _call(api, *args, **kargs):
method = APIMethod(api, args, kargs)
return method.execute()
# Set pagination mode
if 'cursor' in APIMethod.allowed_param:
_call.pagination_mode = 'cursor'
elif 'page' in APIMethod.allowed_param:
_call.pagination_mode = 'page'
return _call
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/weibopy/binder.py | Python | gpl3 | 8,100 |
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
"""
weibo API library
"""
__version__ = '1.5'
__author__ = 'Joshua Roesslein'
__license__ = 'MIT'
from weibopy.models import Status, User, DirectMessage, Friendship, SavedSearch, SearchResult, ModelFactory, IDSModel
from weibopy.error import WeibopError
from weibopy.api import API
from weibopy.cache import Cache, MemoryCache, FileCache
from weibopy.auth import BasicAuthHandler, OAuthHandler
from weibopy.streaming import Stream, StreamListener
from weibopy.cursor import Cursor
# Global, unauthenticated instance of API
api = API()
def debug(enable=True, level=1):
import httplib
httplib.HTTPConnection.debuglevel = level
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/weibopy/__init__.py | Python | gpl3 | 706 |
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
import httplib
from socket import timeout
from threading import Thread
from time import sleep
import urllib
from weibopy.auth import BasicAuthHandler
from weibopy.models import Status
from weibopy.api import API
from weibopy.error import WeibopError
from weibopy.utils import import_simplejson
json = import_simplejson()
STREAM_VERSION = 1
class StreamListener(object):
def __init__(self, api=None):
self.api = api or API()
def on_data(self, data):
"""Called when raw data is received from connection.
Override this method if you wish to manually handle
the stream data. Return False to stop stream and close connection.
"""
if 'in_reply_to_status_id' in data:
status = Status.parse(self.api, json.loads(data))
if self.on_status(status) is False:
return False
elif 'delete' in data:
delete = json.loads(data)['delete']['status']
if self.on_delete(delete['id'], delete['user_id']) is False:
return False
elif 'limit' in data:
if self.on_limit(json.loads(data)['limit']['track']) is False:
return False
def on_status(self, status):
"""Called when a new status arrives"""
return
def on_delete(self, status_id, user_id):
"""Called when a delete notice arrives for a status"""
return
def on_limit(self, track):
"""Called when a limitation notice arrvies"""
return
def on_error(self, status_code):
"""Called when a non-200 status code is returned"""
return False
def on_timeout(self):
"""Called when stream connection times out"""
return
class Stream(object):
host = 'stream.twitter.com'
def __init__(self, username, password, listener, timeout=5.0, retry_count = None,
retry_time = 10.0, snooze_time = 5.0, buffer_size=1500, headers=None):
self.auth = BasicAuthHandler(username, password)
self.running = False
self.timeout = timeout
self.retry_count = retry_count
self.retry_time = retry_time
self.snooze_time = snooze_time
self.buffer_size = buffer_size
self.listener = listener
self.api = API()
self.headers = headers or {}
self.body = None
def _run(self):
# setup
self.auth.apply_auth(None, None, self.headers, None)
# enter loop
error_counter = 0
conn = None
while self.running:
if self.retry_count and error_counter > self.retry_count:
# quit if error count greater than retry count
break
try:
conn = httplib.HTTPConnection(self.host)
conn.connect()
conn.sock.settimeout(self.timeout)
conn.request('POST', self.url, self.body, headers=self.headers)
resp = conn.getresponse()
if resp.status != 200:
if self.listener.on_error(resp.status) is False:
break
error_counter += 1
sleep(self.retry_time)
else:
error_counter = 0
self._read_loop(resp)
except timeout:
if self.listener.on_timeout() == False:
break
if self.running is False:
break
conn.close()
sleep(self.snooze_time)
except Exception:
# any other exception is fatal, so kill loop
break
# cleanup
self.running = False
if conn:
conn.close()
def _read_loop(self, resp):
data = ''
while self.running:
if resp.isclosed():
break
# read length
length = ''
while True:
c = resp.read(1)
if c == '\n':
break
length += c
length = length.strip()
if length.isdigit():
length = int(length)
else:
continue
# read data and pass into listener
data = resp.read(length)
if self.listener.on_data(data) is False:
self.running = False
def _start(self, async):
self.running = True
if async:
Thread(target=self._run).start()
else:
self._run()
def firehose(self, count=None, async=False):
if self.running:
raise WeibopError('Stream object already connected!')
self.url = '/%i/statuses/firehose.json?delimited=length' % STREAM_VERSION
if count:
self.url += '&count=%s' % count
self._start(async)
def retweet(self, async=False):
if self.running:
raise WeibopError('Stream object already connected!')
self.url = '/%i/statuses/retweet.json?delimited=length' % STREAM_VERSION
self._start(async)
def sample(self, count=None, async=False):
if self.running:
raise WeibopError('Stream object already connected!')
self.url = '/%i/statuses/sample.json?delimited=length' % STREAM_VERSION
if count:
self.url += '&count=%s' % count
self._start(async)
def filter(self, follow=None, track=None, async=False):
params = {}
self.headers['Content-type'] = "application/x-www-form-urlencoded"
if self.running:
raise WeibopError('Stream object already connected!')
self.url = '/%i/statuses/filter.json?delimited=length' % STREAM_VERSION
if follow:
params['follow'] = ','.join(map(str, follow))
if track:
params['track'] = ','.join(map(str, track))
self.body = urllib.urlencode(params)
self._start(async)
def disconnect(self):
if self.running is False:
return
self.running = False
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/weibopy/streaming.py | Python | gpl3 | 6,143 |
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
import os
import mimetypes
from weibopy.binder import bind_api
from weibopy.error import WeibopError
from weibopy.parsers import ModelParser
class API(object):
"""Twitter API"""
def __init__(self, auth_handler=None,
host='api.t.sina.com.cn', search_host='api.t.sina.com.cn',
cache=None, secure=False, api_root='', search_root='',
retry_count=0, retry_delay=0, retry_errors=None,source=None,
parser=None, log = None):
self.auth = auth_handler
self.host = host
if source == None:
if auth_handler != None:
self.source = self.auth._consumer.key
else:
self.source = source
self.search_host = search_host
self.api_root = api_root
self.search_root = search_root
self.cache = cache
self.secure = secure
self.retry_count = retry_count
self.retry_delay = retry_delay
self.retry_errors = retry_errors
self.parser = parser or ModelParser()
self.log = log
""" statuses/public_timeline """
public_timeline = bind_api(
path = '/statuses/public_timeline.json',
payload_type = 'status', payload_list = True,
allowed_param = []
)
""" statuses/home_timeline """
home_timeline = bind_api(
path = '/statuses/home_timeline.json',
payload_type = 'status', payload_list = True,
allowed_param = ['since_id', 'max_id', 'count', 'page'],
require_auth = True
)
""" statuses/friends_timeline """
friends_timeline = bind_api(
path = '/statuses/friends_timeline.json',
payload_type = 'status', payload_list = True,
allowed_param = ['since_id', 'max_id', 'count', 'page'],
require_auth = True
)
""" statuses/comment """
comment = bind_api(
path = '/statuses/comment.json',
method = 'POST',
payload_type = 'comments',
allowed_param = ['id', 'cid', 'comment'],
require_auth = True
)
""" statuses/comment_destroy """
comment_destroy = bind_api(
path = '/statuses/comment_destroy/{id}.json',
method = 'POST',
payload_type = 'comments',
allowed_param = ['id'],
require_auth = True
)
""" statuses/comments_timeline """
comments = bind_api(
path = '/statuses/comments.json',
payload_type = 'comments', payload_list = True,
allowed_param = ['id', 'count', 'page'],
require_auth = True
)
""" statuses/comments_timeline """
comments_timeline = bind_api(
path = '/statuses/comments_timeline.json',
payload_type = 'comments', payload_list = True,
allowed_param = ['since_id', 'max_id', 'count', 'page'],
require_auth = True
)
""" statuses/comments_by_me """
comments_by_me = bind_api(
path = '/statuses/comments_by_me.json',
payload_type = 'comments', payload_list = True,
allowed_param = ['since_id', 'max_id', 'count', 'page'],
require_auth = True
)
""" statuses/user_timeline """
user_timeline = bind_api(
path = '/statuses/user_timeline.json',
payload_type = 'status', payload_list = True,
allowed_param = ['id', 'user_id', 'screen_name', 'since_id',
'max_id', 'count', 'page']
)
""" statuses/mentions """
mentions = bind_api(
path = '/statuses/mentions.json',
payload_type = 'status', payload_list = True,
allowed_param = ['since_id', 'max_id', 'count', 'page'],
require_auth = True
)
""" statuses/counts """
counts = bind_api(
path = '/statuses/counts.json',
payload_type = 'counts', payload_list = True,
allowed_param = ['ids'],
require_auth = True
)
""" statuses/unread """
unread = bind_api(
path = '/statuses/unread.json',
payload_type = 'counts'
)
""" statuses/retweeted_by_me """
retweeted_by_me = bind_api(
path = '/statuses/retweeted_by_me.json',
payload_type = 'status', payload_list = True,
allowed_param = ['since_id', 'max_id', 'count', 'page'],
require_auth = True
)
""" statuses/retweeted_to_me """
retweeted_to_me = bind_api(
path = '/statuses/retweeted_to_me.json',
payload_type = 'status', payload_list = True,
allowed_param = ['since_id', 'max_id', 'count', 'page'],
require_auth = True
)
""" statuses/retweets_of_me """
retweets_of_me = bind_api(
path = '/statuses/retweets_of_me.json',
payload_type = 'status', payload_list = True,
allowed_param = ['since_id', 'max_id', 'count', 'page'],
require_auth = True
)
""" statuses/show """
get_status = bind_api(
path = '/statuses/show.json',
payload_type = 'status',
allowed_param = ['id']
)
""" statuses/update """
update_status = bind_api(
path = '/statuses/update.json',
method = 'POST',
payload_type = 'status',
allowed_param = ['status', 'lat', 'long', 'source'],
require_auth = True
)
""" statuses/upload """
def upload(self, filename, status, lat=None, long=None, source=None):
if source is None:
source=self.source
headers, post_data = API._pack_image(filename, 1024, source=source, status=status, lat=lat, long=long, contentname="pic")
args = [status]
allowed_param = ['status']
if lat is not None:
args.append(lat)
allowed_param.append('lat')
if long is not None:
args.append(long)
allowed_param.append('long')
if source is not None:
args.append(source)
allowed_param.append('source')
return bind_api(
path = '/statuses/upload.json',
method = 'POST',
payload_type = 'status',
require_auth = True,
allowed_param = allowed_param
)(self, *args, post_data=post_data, headers=headers)
""" statuses/reply """
reply = bind_api(
path = '/statuses/reply.json',
method = 'POST',
payload_type = 'status',
allowed_param = ['id', 'cid','comment'],
require_auth = True
)
""" statuses/repost """
repost = bind_api(
path = '/statuses/repost.json',
method = 'POST',
payload_type = 'status',
allowed_param = ['id', 'status'],
require_auth = True
)
""" statuses/destroy """
destroy_status = bind_api(
path = '/statuses/destroy/{id}.json',
method = 'DELETE',
payload_type = 'status',
allowed_param = ['id'],
require_auth = True
)
""" statuses/retweet """
retweet = bind_api(
path = '/statuses/retweet/{id}.json',
method = 'POST',
payload_type = 'status',
allowed_param = ['id'],
require_auth = True
)
""" statuses/retweets """
retweets = bind_api(
path = '/statuses/retweets/{id}.json',
payload_type = 'status', payload_list = True,
allowed_param = ['id', 'count'],
require_auth = True
)
""" users/show """
get_user = bind_api(
path = '/users/show.json',
payload_type = 'user',
allowed_param = ['id', 'user_id', 'screen_name']
)
""" Get the authenticated user """
def me(self):
return self.get_user(screen_name=self.auth.get_username())
""" users/search """
search_users = bind_api(
path = '/users/search.json',
payload_type = 'user', payload_list = True,
require_auth = True,
allowed_param = ['q', 'per_page', 'page']
)
""" statuses/friends """
friends = bind_api(
path = '/statuses/friends.json',
payload_type = 'user', payload_list = True,
allowed_param = ['id', 'user_id', 'screen_name', 'page', 'cursor']
)
""" statuses/followers """
followers = bind_api(
path = '/statuses/followers.json',
payload_type = 'user', payload_list = True,
allowed_param = ['id', 'user_id', 'screen_name', 'page', 'cursor']
)
""" direct_messages """
direct_messages = bind_api(
path = '/direct_messages.json',
payload_type = 'direct_message', payload_list = True,
allowed_param = ['since_id', 'max_id', 'count', 'page'],
require_auth = True
)
""" direct_messages/sent """
sent_direct_messages = bind_api(
path = '/direct_messages/sent.json',
payload_type = 'direct_message', payload_list = True,
allowed_param = ['since_id', 'max_id', 'count', 'page'],
require_auth = True
)
""" direct_messages/new """
new_direct_message = bind_api(
path = '/direct_messages/new.json',
method = 'POST',
payload_type = 'direct_message',
allowed_param = ['id', 'screen_name', 'user_id', 'text'],
require_auth = True
)
""" direct_messages/destroy """
destroy_direct_message = bind_api(
path = '/direct_messages/destroy/{id}.json',
method = 'DELETE',
payload_type = 'direct_message',
allowed_param = ['id'],
require_auth = True
)
""" friendships/create """
create_friendship = bind_api(
path = '/friendships/create.json',
method = 'POST',
payload_type = 'user',
allowed_param = ['id', 'user_id', 'screen_name', 'follow'],
require_auth = True
)
""" friendships/destroy """
destroy_friendship = bind_api(
path = '/friendships/destroy.json',
method = 'DELETE',
payload_type = 'user',
allowed_param = ['id', 'user_id', 'screen_name'],
require_auth = True
)
""" friendships/exists """
exists_friendship = bind_api(
path = '/friendships/exists.json',
payload_type = 'json',
allowed_param = ['user_a', 'user_b']
)
""" friendships/show """
show_friendship = bind_api(
path = '/friendships/show.json',
payload_type = 'friendship',
allowed_param = ['source_id', 'source_screen_name',
'target_id', 'target_screen_name']
)
""" friends/ids """
friends_ids = bind_api(
path = '/friends/ids.json',
payload_type = 'user',
allowed_param = ['id', 'user_id', 'screen_name', 'cursor', 'count'],
require_auth = True
)
""" followers/ids """
followers_ids = bind_api(
path = '/followers/ids.json',
payload_type = 'json',
allowed_param = ['id', 'page'],
)
""" account/verify_credentials """
def verify_credentials(self):
try:
return bind_api(
path = '/account/verify_credentials.json',
payload_type = 'user',
require_auth = True
)(self)
except WeibopError:
return False
""" account/rate_limit_status """
rate_limit_status = bind_api(
path = '/account/rate_limit_status.json',
payload_type = 'json'
)
""" account/update_delivery_device """
set_delivery_device = bind_api(
path = '/account/update_delivery_device.json',
method = 'POST',
allowed_param = ['device'],
payload_type = 'user',
require_auth = True
)
""" account/update_profile_colors """
update_profile_colors = bind_api(
path = '/account/update_profile_colors.json',
method = 'POST',
payload_type = 'user',
allowed_param = ['profile_background_color', 'profile_text_color',
'profile_link_color', 'profile_sidebar_fill_color',
'profile_sidebar_border_color'],
require_auth = True
)
""" account/update_profile_image """
def update_profile_image(self, filename):
headers, post_data = API._pack_image(filename=filename, max_size=700, source=self.source)
return bind_api(
path = '/account/update_profile_image.json',
method = 'POST',
payload_type = 'user',
require_auth = True
)(self, post_data=post_data, headers=headers)
""" account/update_profile_background_image """
def update_profile_background_image(self, filename, *args, **kargs):
headers, post_data = API._pack_image(filename, 800)
bind_api(
path = '/account/update_profile_background_image.json',
method = 'POST',
payload_type = 'user',
allowed_param = ['tile'],
require_auth = True
)(self, post_data=post_data, headers=headers)
""" account/update_profile """
update_profile = bind_api(
path = '/account/update_profile.json',
method = 'POST',
payload_type = 'user',
allowed_param = ['name', 'url', 'location', 'description'],
require_auth = True
)
""" favorites """
favorites = bind_api(
path = '/favorites/{id}.json',
payload_type = 'status', payload_list = True,
allowed_param = ['id', 'page']
)
""" favorites/create """
create_favorite = bind_api(
path = '/favorites/create/{id}.json',
method = 'POST',
payload_type = 'status',
allowed_param = ['id'],
require_auth = True
)
""" favorites/destroy """
destroy_favorite = bind_api(
path = '/favorites/destroy/{id}.json',
method = 'DELETE',
payload_type = 'status',
allowed_param = ['id'],
require_auth = True
)
""" notifications/follow """
enable_notifications = bind_api(
path = '/notifications/follow.json',
method = 'POST',
payload_type = 'user',
allowed_param = ['id', 'user_id', 'screen_name'],
require_auth = True
)
""" notifications/leave """
disable_notifications = bind_api(
path = '/notifications/leave.json',
method = 'POST',
payload_type = 'user',
allowed_param = ['id', 'user_id', 'screen_name'],
require_auth = True
)
""" blocks/create """
create_block = bind_api(
path = '/blocks/create.json',
method = 'POST',
payload_type = 'user',
allowed_param = ['id', 'user_id', 'screen_name'],
require_auth = True
)
""" blocks/destroy """
destroy_block = bind_api(
path = '/blocks/destroy.json',
method = 'DELETE',
payload_type = 'user',
allowed_param = ['id', 'user_id', 'screen_name'],
require_auth = True
)
""" blocks/exists """
def exists_block(self, *args, **kargs):
try:
bind_api(
path = '/blocks/exists.json',
allowed_param = ['id', 'user_id', 'screen_name'],
require_auth = True
)(self, *args, **kargs)
except WeibopError:
return False
return True
""" blocks/blocking """
blocks = bind_api(
path = '/blocks/blocking.json',
payload_type = 'user', payload_list = True,
allowed_param = ['page'],
require_auth = True
)
""" blocks/blocking/ids """
blocks_ids = bind_api(
path = '/blocks/blocking/ids.json',
payload_type = 'json',
require_auth = True
)
""" statuses/repost """
report_spam = bind_api(
path = '/report_spam.json',
method = 'POST',
payload_type = 'user',
allowed_param = ['id', 'user_id', 'screen_name'],
require_auth = True
)
""" saved_searches """
saved_searches = bind_api(
path = '/saved_searches.json',
payload_type = 'saved_search', payload_list = True,
require_auth = True
)
""" saved_searches/show """
get_saved_search = bind_api(
path = '/saved_searches/show/{id}.json',
payload_type = 'saved_search',
allowed_param = ['id'],
require_auth = True
)
""" saved_searches/create """
create_saved_search = bind_api(
path = '/saved_searches/create.json',
method = 'POST',
payload_type = 'saved_search',
allowed_param = ['query'],
require_auth = True
)
""" saved_searches/destroy """
destroy_saved_search = bind_api(
path = '/saved_searches/destroy/{id}.json',
method = 'DELETE',
payload_type = 'saved_search',
allowed_param = ['id'],
require_auth = True
)
""" help/test """
def test(self):
try:
bind_api(
path = '/help/test.json',
)(self)
except WeibopError:
return False
return True
def create_list(self, *args, **kargs):
return bind_api(
path = '/%s/lists.json' % self.auth.get_username(),
method = 'POST',
payload_type = 'list',
allowed_param = ['name', 'mode', 'description'],
require_auth = True
)(self, *args, **kargs)
def destroy_list(self, slug):
return bind_api(
path = '/%s/lists/%s.json' % (self.auth.get_username(), slug),
method = 'DELETE',
payload_type = 'list',
require_auth = True
)(self)
def update_list(self, slug, *args, **kargs):
return bind_api(
path = '/%s/lists/%s.json' % (self.auth.get_username(), slug),
method = 'POST',
payload_type = 'list',
allowed_param = ['name', 'mode', 'description'],
require_auth = True
)(self, *args, **kargs)
lists = bind_api(
path = '/{user}/lists.json',
payload_type = 'list', payload_list = True,
allowed_param = ['user', 'cursor'],
require_auth = True
)
lists_memberships = bind_api(
path = '/{user}/lists/memberships.json',
payload_type = 'list', payload_list = True,
allowed_param = ['user', 'cursor'],
require_auth = True
)
lists_subscriptions = bind_api(
path = '/{user}/lists/subscriptions.json',
payload_type = 'list', payload_list = True,
allowed_param = ['user', 'cursor'],
require_auth = True
)
list_timeline = bind_api(
path = '/{owner}/lists/{slug}/statuses.json',
payload_type = 'status', payload_list = True,
allowed_param = ['owner', 'slug', 'since_id', 'max_id', 'count', 'page']
)
get_list = bind_api(
path = '/{owner}/lists/{slug}.json',
payload_type = 'list',
allowed_param = ['owner', 'slug']
)
def add_list_member(self, slug, *args, **kargs):
return bind_api(
path = '/%s/%s/members.json' % (self.auth.get_username(), slug),
method = 'POST',
payload_type = 'list',
allowed_param = ['id'],
require_auth = True
)(self, *args, **kargs)
def remove_list_member(self, slug, *args, **kargs):
return bind_api(
path = '/%s/%s/members.json' % (self.auth.get_username(), slug),
method = 'DELETE',
payload_type = 'list',
allowed_param = ['id'],
require_auth = True
)(self, *args, **kargs)
list_members = bind_api(
path = '/{owner}/{slug}/members.json',
payload_type = 'user', payload_list = True,
allowed_param = ['owner', 'slug', 'cursor']
)
def is_list_member(self, owner, slug, user_id):
try:
return bind_api(
path = '/%s/%s/members/%s.json' % (owner, slug, user_id),
payload_type = 'user'
)(self)
except WeibopError:
return False
subscribe_list = bind_api(
path = '/{owner}/{slug}/subscribers.json',
method = 'POST',
payload_type = 'list',
allowed_param = ['owner', 'slug'],
require_auth = True
)
unsubscribe_list = bind_api(
path = '/{owner}/{slug}/subscribers.json',
method = 'DELETE',
payload_type = 'list',
allowed_param = ['owner', 'slug'],
require_auth = True
)
list_subscribers = bind_api(
path = '/{owner}/{slug}/subscribers.json',
payload_type = 'user', payload_list = True,
allowed_param = ['owner', 'slug', 'cursor']
)
def is_subscribed_list(self, owner, slug, user_id):
try:
return bind_api(
path = '/%s/%s/subscribers/%s.json' % (owner, slug, user_id),
payload_type = 'user'
)(self)
except WeibopError:
return False
""" trends/available """
trends_available = bind_api(
path = '/trends/available.json',
payload_type = 'json',
allowed_param = ['lat', 'long']
)
""" trends/location """
trends_location = bind_api(
path = '/trends/{woeid}.json',
payload_type = 'json',
allowed_param = ['woeid']
)
""" search """
search = bind_api(
search_api = True,
path = '/search.json',
payload_type = 'search_result', payload_list = True,
allowed_param = ['q', 'lang', 'locale', 'rpp', 'page', 'since_id', 'geocode', 'show_user']
)
search.pagination_mode = 'page'
""" trends """
trends = bind_api(
search_api = True,
path = '/trends.json',
payload_type = 'json'
)
""" trends/current """
trends_current = bind_api(
search_api = True,
path = '/trends/current.json',
payload_type = 'json',
allowed_param = ['exclude']
)
""" trends/daily """
trends_daily = bind_api(
search_api = True,
path = '/trends/daily.json',
payload_type = 'json',
allowed_param = ['date', 'exclude']
)
""" trends/weekly """
trends_weekly = bind_api(
search_api = True,
path = '/trends/weekly.json',
payload_type = 'json',
allowed_param = ['date', 'exclude']
)
""" Internal use only """
@staticmethod
def _pack_image(filename, max_size, source=None, status=None, lat=None, long=None, contentname="image"):
"""Pack image from file into multipart-formdata post body"""
# image must be less than 700kb in size
try:
if os.path.getsize(filename) > (max_size * 1024):
raise WeibopError('File is too big, must be less than 700kb.')
#except os.error, e:
except os.error:
raise WeibopError('Unable to access file')
# image must be gif, jpeg, or png
file_type = mimetypes.guess_type(filename)
if file_type is None:
raise WeibopError('Could not determine file type')
file_type = file_type[0]
if file_type not in ['image/gif', 'image/jpeg', 'image/png']:
raise WeibopError('Invalid file type for image: %s' % file_type)
# build the mulitpart-formdata body
fp = open(filename, 'rb')
BOUNDARY = 'Tw3ePy'
body = []
if status is not None:
body.append('--' + BOUNDARY)
body.append('Content-Disposition: form-data; name="status"')
body.append('Content-Type: text/plain; charset=US-ASCII')
body.append('Content-Transfer-Encoding: 8bit')
body.append('')
body.append(status)
if source is not None:
body.append('--' + BOUNDARY)
body.append('Content-Disposition: form-data; name="source"')
body.append('Content-Type: text/plain; charset=US-ASCII')
body.append('Content-Transfer-Encoding: 8bit')
body.append('')
body.append(source)
if lat is not None:
body.append('--' + BOUNDARY)
body.append('Content-Disposition: form-data; name="lat"')
body.append('Content-Type: text/plain; charset=US-ASCII')
body.append('Content-Transfer-Encoding: 8bit')
body.append('')
body.append(lat)
if long is not None:
body.append('--' + BOUNDARY)
body.append('Content-Disposition: form-data; name="long"')
body.append('Content-Type: text/plain; charset=US-ASCII')
body.append('Content-Transfer-Encoding: 8bit')
body.append('')
body.append(long)
body.append('--' + BOUNDARY)
body.append('Content-Disposition: form-data; name="'+ contentname +'"; filename="%s"' % filename)
body.append('Content-Type: %s' % file_type)
body.append('Content-Transfer-Encoding: binary')
body.append('')
body.append(fp.read())
body.append('--' + BOUNDARY + '--')
body.append('')
fp.close()
body.append('--' + BOUNDARY + '--')
body.append('')
body = '\r\n'.join(body)
# build headers
headers = {
'Content-Type': 'multipart/form-data; boundary=Tw3ePy',
'Content-Length': len(body)
}
return headers, body
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/weibopy/api.py | Python | gpl3 | 25,468 |
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from weibopy.error import WeibopError
class Cursor(object):
"""Pagination helper class"""
def __init__(self, method, *args, **kargs):
if hasattr(method, 'pagination_mode'):
if method.pagination_mode == 'cursor':
self.iterator = CursorIterator(method, args, kargs)
else:
self.iterator = PageIterator(method, args, kargs)
else:
raise WeibopError('This method does not perform pagination')
def pages(self, limit=0):
"""Return iterator for pages"""
if limit > 0:
self.iterator.limit = limit
return self.iterator
def items(self, limit=0):
"""Return iterator for items in each page"""
i = ItemIterator(self.iterator)
i.limit = limit
return i
class BaseIterator(object):
def __init__(self, method, args, kargs):
self.method = method
self.args = args
self.kargs = kargs
self.limit = 0
def next(self):
raise NotImplementedError
def prev(self):
raise NotImplementedError
def __iter__(self):
return self
class CursorIterator(BaseIterator):
def __init__(self, method, args, kargs):
BaseIterator.__init__(self, method, args, kargs)
self.next_cursor = -1
self.prev_cursor = 0
self.count = 0
def next(self):
if self.next_cursor == 0 or (self.limit and self.count == self.limit):
raise StopIteration
data, cursors = self.method(
cursor=self.next_cursor, *self.args, **self.kargs
)
self.prev_cursor, self.next_cursor = cursors
if len(data) == 0:
raise StopIteration
self.count += 1
return data
def prev(self):
if self.prev_cursor == 0:
raise WeibopError('Can not page back more, at first page')
data, self.next_cursor, self.prev_cursor = self.method(
cursor=self.prev_cursor, *self.args, **self.kargs
)
self.count -= 1
return data
class PageIterator(BaseIterator):
def __init__(self, method, args, kargs):
BaseIterator.__init__(self, method, args, kargs)
self.current_page = 0
def next(self):
self.current_page += 1
items = self.method(page=self.current_page, *self.args, **self.kargs)
if len(items) == 0 or (self.limit > 0 and self.current_page > self.limit):
raise StopIteration
return items
def prev(self):
if (self.current_page == 1):
raise WeibopError('Can not page back more, at first page')
self.current_page -= 1
return self.method(page=self.current_page, *self.args, **self.kargs)
class ItemIterator(BaseIterator):
def __init__(self, page_iterator):
self.page_iterator = page_iterator
self.limit = 0
self.current_page = None
self.page_index = -1
self.count = 0
def next(self):
if self.limit > 0 and self.count == self.limit:
raise StopIteration
if self.current_page is None or self.page_index == len(self.current_page) - 1:
# Reached end of current page, get the next page...
self.current_page = self.page_iterator.next()
self.page_index = -1
self.page_index += 1
self.count += 1
return self.current_page[self.page_index]
def prev(self):
if self.current_page is None:
raise WeibopError('Can not go back more, at first page')
if self.page_index == 0:
# At the beginning of the current page, move to next...
self.current_page = self.page_iterator.prev()
self.page_index = len(self.current_page)
if self.page_index == 0:
raise WeibopError('No more items')
self.page_index -= 1
self.count -= 1
return self.current_page[self.page_index]
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/weibopy/cursor.py | Python | gpl3 | 4,026 |
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
import time
import threading
import os
import cPickle as pickle
try:
import hashlib
except ImportError:
# python 2.4
import md5 as hashlib
try:
import fcntl
except ImportError:
# Probably on a windows system
# TODO: use win32file
pass
class Cache(object):
"""Cache interface"""
def __init__(self, timeout=60):
"""Initialize the cache
timeout: number of seconds to keep a cached entry
"""
self.timeout = timeout
def store(self, key, value):
"""Add new record to cache
key: entry key
value: data of entry
"""
raise NotImplementedError
def get(self, key, timeout=None):
"""Get cached entry if exists and not expired
key: which entry to get
timeout: override timeout with this value [optional]
"""
raise NotImplementedError
def count(self):
"""Get count of entries currently stored in cache"""
raise NotImplementedError
def cleanup(self):
"""Delete any expired entries in cache."""
raise NotImplementedError
def flush(self):
"""Delete all cached entries"""
raise NotImplementedError
class MemoryCache(Cache):
"""In-memory cache"""
def __init__(self, timeout=60):
Cache.__init__(self, timeout)
self._entries = {}
self.lock = threading.Lock()
def __getstate__(self):
# pickle
return {'entries': self._entries, 'timeout': self.timeout}
def __setstate__(self, state):
# unpickle
self.lock = threading.Lock()
self._entries = state['entries']
self.timeout = state['timeout']
def _is_expired(self, entry, timeout):
return timeout > 0 and (time.time() - entry[0]) >= timeout
def store(self, key, value):
self.lock.acquire()
self._entries[key] = (time.time(), value)
self.lock.release()
def get(self, key, timeout=None):
self.lock.acquire()
try:
# check to see if we have this key
entry = self._entries.get(key)
if not entry:
# no hit, return nothing
return None
# use provided timeout in arguments if provided
# otherwise use the one provided during init.
if timeout is None:
timeout = self.timeout
# make sure entry is not expired
if self._is_expired(entry, timeout):
# entry expired, delete and return nothing
del self._entries[key]
return None
# entry found and not expired, return it
return entry[1]
finally:
self.lock.release()
def count(self):
return len(self._entries)
def cleanup(self):
self.lock.acquire()
try:
for k, v in self._entries.items():
if self._is_expired(v, self.timeout):
del self._entries[k]
finally:
self.lock.release()
def flush(self):
self.lock.acquire()
self._entries.clear()
self.lock.release()
class FileCache(Cache):
"""File-based cache"""
# locks used to make cache thread-safe
cache_locks = {}
def __init__(self, cache_dir, timeout=60):
Cache.__init__(self, timeout)
if os.path.exists(cache_dir) is False:
os.mkdir(cache_dir)
self.cache_dir = cache_dir
if cache_dir in FileCache.cache_locks:
self.lock = FileCache.cache_locks[cache_dir]
else:
self.lock = threading.Lock()
FileCache.cache_locks[cache_dir] = self.lock
if os.name == 'posix':
self._lock_file = self._lock_file_posix
self._unlock_file = self._unlock_file_posix
elif os.name == 'nt':
self._lock_file = self._lock_file_win32
self._unlock_file = self._unlock_file_win32
else:
print 'Warning! FileCache locking not supported on this system!'
self._lock_file = self._lock_file_dummy
self._unlock_file = self._unlock_file_dummy
def _get_path(self, key):
md5 = hashlib.md5()
md5.update(key)
return os.path.join(self.cache_dir, md5.hexdigest())
def _lock_file_dummy(self, path, exclusive=True):
return None
def _unlock_file_dummy(self, lock):
return
def _lock_file_posix(self, path, exclusive=True):
lock_path = path + '.lock'
if exclusive is True:
f_lock = open(lock_path, 'w')
fcntl.lockf(f_lock, fcntl.LOCK_EX)
else:
f_lock = open(lock_path, 'r')
fcntl.lockf(f_lock, fcntl.LOCK_SH)
if os.path.exists(lock_path) is False:
f_lock.close()
return None
return f_lock
def _unlock_file_posix(self, lock):
lock.close()
def _lock_file_win32(self, path, exclusive=True):
# TODO: implement
return None
def _unlock_file_win32(self, lock):
# TODO: implement
return
def _delete_file(self, path):
os.remove(path)
if os.path.exists(path + '.lock'):
os.remove(path + '.lock')
def store(self, key, value):
path = self._get_path(key)
self.lock.acquire()
try:
# acquire lock and open file
f_lock = self._lock_file(path)
datafile = open(path, 'wb')
# write data
pickle.dump((time.time(), value), datafile)
# close and unlock file
datafile.close()
self._unlock_file(f_lock)
finally:
self.lock.release()
def get(self, key, timeout=None):
return self._get(self._get_path(key), timeout)
def _get(self, path, timeout):
if os.path.exists(path) is False:
# no record
return None
self.lock.acquire()
try:
# acquire lock and open
f_lock = self._lock_file(path, False)
datafile = open(path, 'rb')
# read pickled object
created_time, value = pickle.load(datafile)
datafile.close()
# check if value is expired
if timeout is None:
timeout = self.timeout
if timeout > 0 and (time.time() - created_time) >= timeout:
# expired! delete from cache
value = None
self._delete_file(path)
# unlock and return result
self._unlock_file(f_lock)
return value
finally:
self.lock.release()
def count(self):
c = 0
for entry in os.listdir(self.cache_dir):
if entry.endswith('.lock'):
continue
c += 1
return c
def cleanup(self):
for entry in os.listdir(self.cache_dir):
if entry.endswith('.lock'):
continue
self._get(os.path.join(self.cache_dir, entry), None)
def flush(self):
for entry in os.listdir(self.cache_dir):
if entry.endswith('.lock'):
continue
self._delete_file(os.path.join(self.cache_dir, entry))
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/weibopy/cache.py | Python | gpl3 | 7,372 |
import math
import pickle
from matrix import Matrix
from classifier_matrix import ClassifierMatrix
from segmenter import Segmenter
from py_mining import PyMining
from configuration import Configuration
class NaiveBayes:
def __init__(self, config, nodeName, loadFromFile = False):
#store variable(term)'s likelihood to each class
self.vTable = []
#store prior of each class
self.cPrior = []
#store isTrained by data
self.trained = loadFromFile
self.curNode = config.GetChild(nodeName)
self.modelPath = self.curNode.GetChild("model_path").GetValue()
self.logPath = self.curNode.GetChild("log_path").GetValue()
if (loadFromFile):
f = open(self.modelPath, "r")
modelStr = pickle.load(f)
[self.vTable, self.cPrior] = pickle.loads(modelStr)
f.close()
def Train(self, x, y):
#check parameters
if (x.nRow <> len(y)):
print "ERROR!, x.nRow should == len(y)"
return False
#calculate prior of each class
#1. init cPrior:
yy = set(y)
yy = list(yy)
yy.sort()
self.cPrior = [0 for i in range(yy[len(yy) - 1] + 1)]
#2. fill cPrior
for i in y:
self.cPrior[i] += 1
#calculate likehood of each term
#1. init vTable:
self.vTable = [[0 for i in range(len(self.cPrior))] \
for j in range(x.nCol)]
#2. fill vTable
for r in range(x.nRow):
for i in range(x.rows[r], x.rows[r + 1]):
self.vTable[x.cols[i]][y[r]] += 1
#normalize vTable
for i in range(x.nCol):
for j in range(len(self.cPrior)):
if (self.cPrior[j] > 1e-10):
self.vTable[i][j] /= float(self.cPrior[j])
#normalize cPrior
for i in range(len(self.cPrior)):
self.cPrior[i] /= float(len(y))
self.trained = True
#dump model path
f = open(self.modelPath, "w")
modelStr = pickle.dumps([self.vTable, self.cPrior], 1)
pickle.dump(modelStr, f)
f.close()
return True
def TestSample(self, cols, vals):
#check parameter
if (not self.trained):
print "Error!, not trained!"
return False
if (len(cols) <> len(vals)):
print "Error! len of cols should == len of vals"
return False
#calculate best p
targetP = []
maxP = -1000000000
for target in range(len(self.cPrior)):
curP = 0
curP += math.log(self.cPrior[target])
for c in range(0, len(cols)):
if (self.vTable[cols[c]][target] == 0):
curP += math.log(1e-7)
else:
curP += math.log(self.vTable[cols[c]][target])
#debug
#if (self.logPath <> ""):
# term = PyMining.idToTerm[cols[c]]
# prob = math.log(self.vTable[cols[c]][target] + 1e-7)
# f.write(term.encode("utf-8") + ":" + str(cols[c]) + ":" + str(prob) + "\n")
targetP.append(curP)
if (curP > maxP):
bestY = target
maxP = curP
#normalize probable
ret = []
total = 0
for i in range(len(targetP)):
total += math.exp(targetP[i])
for i in range(len(targetP)):
ret.append((i, math.exp(targetP[i]) / total))
return tuple(ret)
def Test(self, x, y):
#check parameter
if (not self.trained):
print "Error!, not trained!"
return False
if (x.nRow != len(y)):
print "Error! x.nRow should == len(y)"
return False
retY = []
correct = 0
if (self.logPath <> ""):
f = open(self.logPath, "w")
#predict all doc one by one
for r in range(x.nRow):
bestY = -1
maxP = -1000000000
#debug
if (self.logPath <> ""):
f.write("\n ===============new doc=================")
#calculate best p
for target in range(len(self.cPrior)):
curP = 0
if (self.cPrior[target] > 1e-8):
curP += math.log(self.cPrior[target])
else:
curP += math.log(1e-8)
#debug
if (self.logPath <> ""):
f.write("<target> : " + str(target) + "\n")
for c in range(x.rows[r], x.rows[r + 1]):
if (self.vTable[x.cols[c]][target] == 0):
curP += math.log(1e-7)
else:
curP += math.log(self.vTable[x.cols[c]][target])
#debug
if (self.logPath <> ""):
term = PyMining.idToTerm[x.cols[c]]
prob = math.log(self.vTable[x.cols[c]][target] + 1e-7)
f.write(term.encode("utf-8") + ":" + str(x.cols[c]) + ":" + str(prob) + "\n")
if (curP > maxP):
bestY = target
maxP = curP
#debug
if (self.logPath <> ""):
f.write("curP:" + str(curP) + "\n")
if (bestY < 0):
print "best y < 0, error!"
return False
if (bestY == y[r]):
correct += 1
#debug
else:
if (self.logPath <> ""):
f.write("predict error!")
retY.append(bestY)
if (self.logPath <> ""):
f.close()
return [retY, float(correct) / len(retY)]
if __name__ == "__main__":
config = Configuration.FromFile("conf/test.xml")
PyMining.Init(config, "__global__")
matCreater = ClassifierMatrix(config, "__matrix__")
[trainx, trainy] = matCreater.CreateTrainMatrix("data/train.txt")
nbModel = NaiveBayes(config, "naive_bayes")
nbModel.Train(trainx, trainy)
[testx, testy] = matCreater.CreatePredictMatrix("data/test.txt")
[resultY, precision] = nbModel.Test(testx, testy)
"""
print "testX, rows, cols ,vals"
print testX.rows
print testY
print testX.cols
"""
print precision
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/pymining/naive_bayes.py | Python | gpl3 | 6,501 |
from matrix import Matrix
from classifier_matrix import ClassifierMatrix
from segmenter import Segmenter
from py_mining import PyMining
from configuration import Configuration
from chisquare_filter import ChiSquareFilter
from naive_bayes import NaiveBayes
if __name__ == "__main__":
config = Configuration.FromFile("conf/test.xml")
PyMining.Init(config, "__global__", True)
matCreater = ClassifierMatrix(config, "__matrix__", True)
chiFilter = ChiSquareFilter(config, "__filter__", True)
nbModel = NaiveBayes(config, "naive_bayes", True)
[testx, testy] = matCreater.CreatePredictMatrix("data/test.txt")
[testx, testy] = chiFilter.MatrixFilter(testx, testy)
[resultY, precision] = nbModel.Test(testx, testy)
print precision
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/pymining/test.naive_bayes_test.py | Python | gpl3 | 767 |
import math
from segmenter import Segmenter
from matrix import Matrix
from py_mining import PyMining
from configuration import Configuration
class ClassifierMatrix:
def __init__(self, config, nodeName, loadFromFile = False):
self.node = config.GetChild(nodeName)
self.segmenter = Segmenter(config, "__segmenter__")
self.trained = loadFromFile
PyMining.Init(config, "__global__", loadFromFile)
"""
create train matrix:
fill dict in PyMining, record:
1)termToId
2)idToTerm
3)termToDocCount
4)classToDocCount
and save mat-x using csr, save mat-y using list
"""
def CreateTrainMatrix(self, path = ""):
#get input-path
inputPath = path
if (inputPath == ""):
inputPath = self.node.GetChild("train_input").GetValue()
f = open(inputPath, "r")
uid = 0
rows = [0]
cols = []
vals = []
y = []
#fill the matrix's cols and rows
for line in f:
vec = line.split("\t")
line = vec[0]
target = int(vec[1])
y.append(target)
wordList = self.segmenter.Split(line.decode("utf-8"))
#store current row's cols
partCols = []
#create dicts and fill partCol
#calculate term-frequent in this loop
curWordCount = 0
termFres = {}
for word in wordList:
curWordCount += 1
if (not PyMining.termToId.has_key(word)):
PyMining.termToId[word] = uid
PyMining.idToTerm[uid] = word
uid += 1
termId = PyMining.termToId[word]
partCols.append(termId)
if (not termFres.has_key(termId)):
termFres[termId] = 1
else:
termFres[termId] += 1
#fill partCol
partCols = set(partCols)
partCols = list(partCols)
partCols.sort()
#fill cols and vals, fill termToDocCount
for col in partCols:
cols.append(col)
#fill vals with termFrequent
vals.append(termFres[col])
#fill idToDocCount
if (not PyMining.idToDocCount.has_key(col)):
PyMining.idToDocCount[col] = 1
else:
PyMining.idToDocCount[col] += 1
#fill rows
rows.append(rows[len(rows) - 1] + \
len(partCols))
#fill classToDocCount
if (not PyMining.classToDocCount.has_key(target)):
PyMining.classToDocCount[target] = 1
else:
PyMining.classToDocCount[target] += 1
#fill PyMining's idToIdf
for termId in PyMining.idToTerm.keys():
PyMining.idToIdf[termId] = math.log(float(len(rows) - 1) / (PyMining.idToDocCount[termId] + 1))
#NOTE: now, not mul idf to vals, because not all algorithms need tf * idf
#change matrix's vals using tf-idf represent
#for r in range(len(rows) - 1):
# for c in range(rows[r], rows[r + 1]):
# termId = cols[c]
# #idf(i) = log(|D| / |{d (ti included)}| + 1
# vals[c] = vals[c] * PyMining.idToIdf[termId]
#close file
f.close()
#write dicts out
PyMining.Write()
self.trained = True
return [Matrix(rows, cols, vals), y]
def CreatePredictSample(self, src):
print src
if (not self.trained):
print "train Classifier Matrix before predict"
#split sentence
#if src is read from utf-8 file directly,
# should using CreatePredictSample(src.decode("utf-8"))
wordList = self.segmenter.Split(src)
cols = []
vals = []
#fill partCols, and create csr
partCols = []
termFreqs = {}
for word in wordList:
if (PyMining.termToId.has_key(word)):
termId = PyMining.termToId[word]
partCols.append(termId)
if (not termFreqs.has_key(termId)):
termFreqs[termId] = 1
else:
termFreqs[termId] += 1
partCols = set(partCols)
partCols = list(partCols)
partCols.sort()
for col in partCols:
cols.append(col)
vals.append(termFreqs[col])
return [cols, vals]
"""
create predict matrix using previous dict
"""
def CreatePredictMatrix(self, path = ""):
if (not self.trained):
print "train ClassifierMatrix before predict"
return False
#get input path
inputPath = path
if (inputPath == ""):
inputPath = self.curNode.GetChild("test_input")
f = open(inputPath, "r")
rows = [0]
cols = []
vals = []
y = []
for line in f:
vec = line.split("\t")
line = vec[0]
y.append(int(vec[1]))
#split sentence
wordList = self.segmenter.Split(line.decode("utf-8"))
#fill partCols, and create csr
partCols = []
termFreqs = {}
curWordCount = 0
for word in wordList:
curWordCount += 1
if (PyMining.termToId.has_key(word)):
termId = PyMining.termToId[word]
partCols.append(termId)
if (not termFreqs.has_key(termId)):
termFreqs[termId] = 1
else:
termFreqs[termId] += 1
partCols = set(partCols)
partCols = list(partCols)
partCols.sort()
for col in partCols:
cols.append(col)
vals.append(termFreqs[col])
rows.append(rows[len(rows) - 1] + \
len(partCols))
#close file
f.close()
return [Matrix(rows, cols, vals), y]
if __name__ == "__main__":
config = Configuration.FromFile("conf/test.xml")
matCreater = ClassifierMatrix(config, "__matrix__")
[trainMat, ty] = matCreater.CreateTrainMatrix("data/tuangou_titles3.txt")
[predictMat, py] = matCreater.CreatePredictMatrix("data/tuangou_titles3.txt")
print py
print predictMat.rows
print predictMat.cols
print predictMat.vals
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/pymining/classifier_matrix.py | Python | gpl3 | 6,548 |
if __name__ == "__main__":
"""
train
"""
#init dm platfrom, include segmenter..
config = Configuration.FromFile("test.conf")
PyMining.Init(config, "__global__")
matCreater = ClassifierMatrix(config, "__matrix__")
[trainx, trainy] = matCreater.CreateTrainMatrix("train.txt")
#or using matCreater.CreateTrainMatrix(), train corpus will read from config
chiFilter = ChiSquareFilter(config, "__filter__")
chiFilter.TrainFilter(trainx, trainy)
#or using chiFilter.Create(trainx, trainy) get default setting in config
nbModel = NaiveBayes(config, "naive_bayes")
nbModel.Train(trainx, trainy)
"""
test
"""
# config = Configuration.FromFile("test.conf")
# PyMining.Init(config, "__global__", True), True means load from previos file
# matCreater = ClassifierMatrix(config, "__matrix__", True)
[testx, testy] = matCreater.CreateTestMatrix("test.txt")
#chiFilter = ChiSquareFilter(config, "__filter__", True)
[testx, testy] = chiFilter.MatrixFilter(testx, testy)
#nbModel = NaiveBayes(config, "naive_bayes", True)
[predicty, precision] = nbModel.Predict(testx, testy)
print precision
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/pymining/pdmp_ex.py | Python | gpl3 | 1,187 |
#encoding=utf-8
import math
import pickle
import sys
from matrix import Matrix
from classifier_matrix import ClassifierMatrix
from segmenter import Segmenter
from py_mining import PyMining
from configuration import Configuration
from chisquare_filter import ChiSquareFilter
from twc_naive_bayes import TwcNaiveBayes
if __name__ == "__main__":
config = Configuration.FromFile("conf/test.xml")
PyMining.Init(config, "__global__")
matCreater = ClassifierMatrix(config, "__matrix__")
[trainx, trainy] = matCreater.CreateTrainMatrix("data/train.txt")
nbModel = TwcNaiveBayes(config, "twc_naive_bayes")
nbModel.Train(trainx, trainy)
inputStr = "仅售59元!原价108元的花园巴西烤肉自助餐一人次任吃(蛇口店、购物公园店全时段通用),另赠送两张10元现金抵用券!邀请好友返利10元!"
[cols, vals] = matCreater.CreatePredictSample(inputStr.decode("utf-8"))
retY = nbModel.TestSample(cols, vals)
print retY
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/pymining/test.twc_naive_bayes_train_sample_test.py | Python | gpl3 | 994 |
from xml.dom import minidom
class Configuration:
mCurNode = None
def __init__(self, node):
self.mCurNode = node
"""
get first child
"""
def GetChild(self, name):
for node in self.mCurNode.childNodes:
if node.nodeName == name:
return Configuration(node)
return None
def GetChilds(self, name):
nodes = []
for node in self.mCurNode.childNodes:
if node.nodeName == name:
nodes.append(Configuration(node))
return nodes
def GetName(self):
return self.mCurNode.nodeName
def GetValue(self):
return self.mCurNode.firstChild.data
@staticmethod
def FromFile(path):
return Configuration(minidom.parse(path).childNodes[0])
if __name__ == "__main__":
cfg = Configuration.FromFile("sandbox/test.xml")
print cfg.GetName()
print cfg.GetValue()
cfg1 = cfg.GetChild("hello")
print cfg1.GetName()
print cfg1.GetValue()
cfgs = cfg.GetChilds("world")
for c in cfgs:
print c.GetName()
print c.GetValue()
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/pymining/configuration.py | Python | gpl3 | 1,114 |
#save materials produced during data-mining
class PyMining:
#dict store term -> id
termToId = {}
#dict store id -> term
idToTerm = {}
#dict store term -> how-many-docs-have-term
idToDocCount = {}
#dict store class -> how-many-docs-contained
classToDocCount = {}
#inverse document frequent of termId
idToIdf = {}
#filename of above
nameTermToId = ""
nameIdToTerm = ""
nameIdToDocCount = ""
nameClassToDocCount = ""
nameIdToIdf = ""
#isInit
isInit = False
#curNode
curNode = None
@staticmethod
def Init(config, nodeName, loadFromFile = False):
PyMining.termToId = {}
PyMining.idToTerm = {}
PyMining.idToDocCount = {}
PyMining.classToDocCount = {}
PyMining.idToIdf = {}
PyMining.curNode = config.GetChild(nodeName)
PyMining.nameTermToId = PyMining.curNode.GetChild("term_to_id").GetValue()
PyMining.nameIdToTerm = PyMining.curNode.GetChild("id_to_term").GetValue()
PyMining.nameIdToDocCount = PyMining.curNode.GetChild("id_to_doc_count").GetValue()
PyMining.nameClassToDocCount = PyMining.curNode.GetChild("class_to_doc_count").GetValue()
PyMining.nameIdToIdf = PyMining.curNode.GetChild("id_to_idf").GetValue()
if (loadFromFile):
PyMining.__ReadDict(PyMining.termToId, PyMining.nameTermToId, "str", "int")
PyMining.__ReadDict(PyMining.idToTerm, PyMining.nameIdToTerm, "int", "str")
PyMining.__ReadDict(PyMining.idToDocCount, PyMining.nameIdToDocCount, "int", "int")
PyMining.__ReadDict(PyMining.classToDocCount, PyMining.nameClassToDocCount, "int", "int")
PyMining.__ReadDict(PyMining.idToIdf, PyMining.nameIdToIdf, "int", "float")
PyMining.isInit = True
@staticmethod
def Write():
if (not PyMining.isInit):
print "call init before write()"
return False
PyMining.__WriteDict(PyMining.termToId, PyMining.nameTermToId)
PyMining.__WriteDict(PyMining.idToTerm, PyMining.nameIdToTerm)
PyMining.__WriteDict(PyMining.idToDocCount, PyMining.nameIdToDocCount)
PyMining.__WriteDict(PyMining.classToDocCount, PyMining.nameClassToDocCount)
PyMining.__WriteDict(PyMining.idToIdf, PyMining.nameIdToIdf)
return True
@staticmethod
def __ReadDict(dic, filename, typeK, typeV):
f = open(filename, "r")
for line in f:
line = line.decode("utf-8")
vec = line.split("\t")
k = vec[0]
v = vec[1]
if (typeK == "int"):
k = int(k)
if (typeV == "int"):
v = int(v)
elif (typeV == "float"):
v= float(v)
dic[k] = v
f.close()
@staticmethod
def __WriteDict(dic, filename):
f = open(filename, "w")
for k,v in dic.iteritems():
if isinstance(k, (str, unicode)):
f.write(k.encode("utf-8"))
else:
f.write(str(k))
f.write("\t")
if isinstance(v, (str, unicode)):
f.write(v.encode("utf-8"))
else:
f.write(str(v))
f.write("\n")
f.close()
@staticmethod
def ReadDict(dic, nodeName):
if (not PyMining.isInit):
print "init PyMining before using"
path = PyMining.curNode.GetChild(nodeName).GetValue()
PyMining.__ReadDict(dic, path)
@staticmethod
def WriteDict(dic, nodeName):
if (not PyMining.isInit):
print "init PyMining before using"
path = PyMining.curNode.GetChild(nodeName).GetValue()
PyMining.__WriteDict(dic, path)
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/pymining/py_mining.py | Python | gpl3 | 3,781 |
from matrix import Matrix
from classifier_matrix import ClassifierMatrix
from segmenter import Segmenter
from py_mining import PyMining
from configuration import Configuration
from chisquare_filter import ChiSquareFilter
from naive_bayes import NaiveBayes
if __name__ == "__main__":
config = Configuration.FromFile("conf/test.xml")
PyMining.Init(config, "__global__")
matCreater = ClassifierMatrix(config, "__matrix__")
[trainx, trainy] = matCreater.CreateTrainMatrix("data/sogou.train.txt")
chiFilter = ChiSquareFilter(config, "__filter__")
chiFilter.TrainFilter(trainx, trainy)
nbModel = NaiveBayes(config, "naive_bayes")
nbModel.Train(trainx, trainy)
[testx, testy] = matCreater.CreatePredictMatrix("data/sogou.test.txt")
[testx, testy] = chiFilter.MatrixFilter(testx, testy)
[resultY, precision] = nbModel.Test(testx, testy)
print precision
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/pymining/test.naive_bayes_train_test.py | Python | gpl3 | 901 |
import random
import bisect
class Tripple:
def __init__(self, row, col, val):
self.row = row
self.col = col
self.val = val
def Transpose(self):
tmp = self.row
self.row = self.col
self.col = tmp
return self
def TrippleCmp(t1, t2):
if (t1.row < t2.row):
return -1
elif (t1.row > t2.row):
return 1
else:
return t1.col < t2.col
class Matrix:
#init a matrix, using csr, and dimensions
def __init__(self, rows, cols, vals):
self.rows = rows
self.cols = cols
self.vals = vals
self.nRow = len(rows) - 1
maxCol = -1
for col in cols:
if (col > maxCol):
maxCol = col
self.nCol = maxCol + 1
#get element @(x,y), if no element, return 0, if range error, return -1
def Get(self, x, y):
if (x < 0) or (x >= self.nRow):
return 0
index = bisect.bisect_left(self.cols, y, self.rows[x], self.rows[x + 1])
if index < len(self.cols) and index >= 0 and self.cols[index] == y:
return 1
else:
return 0
def Transpose(self, nNewRow):
#make transposed-tripple from csr
triList = []
for r in range(0, len(self.rows) - 1):
for c in range(self.rows[r], self.rows[r + 1]):
t = Tripple(r, self.cols[c], self.vals[c])
t.Transpose()
triList.append(t)
#sort tripple
#for t in triList:
# print t.row, " ", t.col, " ", t.val
#print "====="
#sorted(triList, cmp = TrippleCmp)
triList.sort(cmp = TrippleCmp)
#for t in triList:
# print t.row, " ", t.col, " ", t.val
#make tripple back to csr
newRows = [0]
newCols = []
newVals = []
lastRow = 0
for i in range(0, len(triList)):
#add a new row
if triList[i].row != lastRow:
lastRowsLen = len(newRows)
for j in range(lastRow, triList[i].row - 1):
newRows.append(newRows[lastRowsLen - 1])
newRows.append(i)
lastRow = triList[i].row
#add a new col and val
newCols.append(triList[i].col)
newVals.append(triList[i].val)
for i in range(triList[len(triList) - 1].row, nNewRow - 1):
newRows.append(newRows[len(newRows) - 1])
newRows.append(len(triList))
return Matrix(newRows, newCols, newVals)
@staticmethod
def BaggingFromMatrix(mat, m):
#print "bagging", m
rows = [0]
cols = []
vals = []
maxCol = -1
baggingDict = {}
for i in range(0, m):
ratio = random.random()
index = int(ratio * mat.nRow)
baggingDict[i] = index
#print "add elements to new mat:", mat.rows[index + 1] - mat.rows[index]
rows.append(rows[len(rows) - 1] + (mat.rows[index + 1] - mat.rows[index]))
for j in range(mat.rows[index], mat.rows[index + 1]):
cols.append(mat.cols[j])
if (j > maxCol):
maxCol = j
vals.append(mat.vals[j])
newMat = Matrix(rows, cols, vals)
#print "after bagging:"
#print rows
#print cols
return [newMat.Transpose(mat.nCol), baggingDict]
#if __name__ == "__main__":
#rows = [0, 3, 4, 5, 6]
#cols = [0, 1, 2, 3, 4, 4]
#vals = [1, 1, 1, 1, 1, 1]
#mat = Matrix(rows, cols, vals, 4, 5)
#tMat = mat.Transpose()
#print tMat.rows
#print tMat.cols
#print tMat.vals
#sample = Matrix.BaggingFromMatrix(mat, 2)
#print sample.rows
#print sample.cols
#print sample.vals
#sample = Matrix.BaggingFromMatrix(mat, 2)
#print sample.rows
#print sample.cols
#print sample.vals
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/pymining/matrix.py | Python | gpl3 | 3,956 |
#coding=utf8=
#mmseg
from configuration import Configuration
class Segmenter:
def __init__(self, config, nodeName):
curNode = config.GetChild(nodeName)
self.mainDict = self.LoadMainDict(curNode.GetChild("main_dict").GetValue())
def Split(self, line):
line = line.lower()
index = 0
wordList = []
while index < len(line):
finded = False
for i in range(1, 5, 1) [::-1]:
if (i + index <= len(line)):
curWord = line[index : i + index]
if (self.mainDict.has_key(curWord) and curWord not in wordList):
wordList.append(curWord)
index += i
finded = True
break
if (finded):
continue
index += 1
return wordList
def LoadMainDict(self, path):
f = open(path, "r")
dicts = {}
for line in f:
line = line.decode("utf-8")
if (line.find("\n") >= 0):
line = line[0:line.find("\n")]
dicts[line] = 1
f.close()
return dicts
if __name__ == "__main__":
cfg = Configuration.FromFile("conf/test.xml")
segmenter = Segmenter(cfg, "segmenter")
f = open("result.txt")
for line in f:
wordList = segmenter.Split(line.decode("utf-8"))
for word in wordList:
print word.encode("mbcs")
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/pymining/segmenter.py | Python | gpl3 | 1,474 |
#encoding=utf8
from matrix import Matrix
from classifier_matrix import ClassifierMatrix
from segmenter import Segmenter
from py_mining import PyMining
from configuration import Configuration
from chisquare_filter import ChiSquareFilter
from naive_bayes import NaiveBayes
if __name__ == "__main__":
config = Configuration.FromFile("conf/test.xml")
PyMining.Init(config, "__global__")
matCreater = ClassifierMatrix(config, "__matrix__")
[trainx, trainy] = matCreater.CreateTrainMatrix("data/train.txt")
chiFilter = ChiSquareFilter(config, "__filter__")
chiFilter.TrainFilter(trainx, trainy)
nbModel = NaiveBayes(config, "naive_bayes")
nbModel.Train(trainx, trainy)
inputStr = "仅售28元!原价698元的康迩福韩国美容美体中心的韩国特色美容套餐1份(紫莱花园店、时代奥城店2店通用):韩国特色面部SPA护理1次+韩国特色面部瘦脸加毛孔净化1次+韩国特色水"
[cols, vals] = matCreater.CreatePredictSample(inputStr)
[cols, vals] = chiFilter.SampleFilter(cols, vals)
probTuple = nbModel.TestSample(cols, vals)
print probTuple
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/pymining/test.naive_bayes_train_sample_test.py | Python | gpl3 | 1,142 |
import math
import pickle
import sys
from matrix import Matrix
from classifier_matrix import ClassifierMatrix
from segmenter import Segmenter
from py_mining import PyMining
from configuration import Configuration
class TwcNaiveBayes:
def __init__(self, config, nodeName, loadFromFile = False):
#store weight from term->class
weights = []
self.trained = loadFromFile
self.curNode = config.GetChild(nodeName)
self.modelPath = self.curNode.GetChild("model_path").GetValue()
self.logPath = self.curNode.GetChild("log_path").GetValue()
if (loadFromFile):
f = open(self.modelPath, "r")
modelStr = pickle.load(f)
[self.weights, self.yy] = pickle.loads(modelStr)
f.close()
def Train(self, x, y):
#check parameters
if (x.nRow <> len(y)):
print "Error!, x.nRow should equals len(y)"
return False
"""
calculate d(i(term),j(doc))
1. d(i,j) = log(d(i,j) + 1)
2. d(i,j) = d(i,j) * idf(i)
3. d(i,j) = d(i,j) / sqrt(sigma(d(k,j)^2))
k belong current sample
"""
for r in range(len(x.rows) - 1):
sampleSum = 0.0
for c in range(x.rows[r], x.rows[r + 1]):
termId = x.cols[c]
x.vals[c] = math.log(x.vals[c] + 1)
x.vals[c] = x.vals[c] * PyMining.idToIdf[termId]
sampleSum += x.vals[c] * x.vals[c]
#normalize it
sampleSum = math.sqrt(sampleSum)
for c in range(x.rows[r], x.rows[r + 1]):
x.vals[c] = float(x.vals[c]) / sampleSum
"""
calculate weights
1. theta(c, i) = sigma d(i,j) + alpha(i)
j(y(j) not c
________________________________
sigma sigma d(k, j) + sum(alpha)
j(y(j) != c) k
(alpha(i) = 1)
(sum(alpha(i)) = len(y)
2. w(c, i) = log(theta(c,i))
3. w(c, i) = w(c, i) / sigma(w(c, i))
i
"""
self.yy = set(y)
self.yy = list(self.yy)
self.yy.sort()
#init weights:
self.weights = [[0 for j in range(x.nCol)] for i in range(len(self.yy))]
weightsSum = [0 for i in range(len(self.yy))]
#calculate theta(c,i) = sigma d(i,j) + 1
# y(j)<>c
for classId in range(len(self.yy)):
for r in range(len(x.rows) - 1):
for c in range(x.rows[r], x.rows[r + 1]):
if (y[r] <> self.yy[classId]):
termId = x.cols[c]
self.weights[classId][termId] += x.vals[c]
weightsSum[classId] += x.vals[c]
#normalize weights
classCount = len(self.yy)
for classId in range(len(self.yy)):
curClassSum = 0
for termId in range(x.nCol):
self.weights[classId][termId] += 1
self.weights[classId][termId] /= float(weightsSum[classId]) + classCount
self.weights[classId][termId] = math.log(self.weights[classId][termId])
curClassSum += math.fabs(self.weights[classId][termId])
for termId in range(x.nCol):
self.weights[classId][termId] /= curClassSum
self.trained = True
#dump model
f = open(self.modelPath, "w")
modelStr = pickle.dumps([self.weights, self.yy], 1)
pickle.dump(modelStr, f)
f.close()
return True
"""
l(t) = argmin sigma t(i) * w(c,i)
c i
(t(i) is frequency of termI in this sample)
"""
def __GetBestTarget(self, cols, vals):
if (len(cols) <> len(vals)):
print "Error!, len of cols should == len of vals"
return -1
#get min likelihood
#minL = sys.maxint
retList = []
maxL = -1
bestClass = 0
sumProb = 0
for classIndex in range(len(self.yy)):
curL = 0
for c in range(len(cols)):
termId = cols[c]
termFreq = vals[c]
curL += termFreq * self.weights[classIndex][termId]
retList.append([self.yy[classIndex], curL])
return tuple(retList)
"""
get result of a single-line-sample
"""
def TestSample(self, cols, vals):
#check parameter
if (not self.trained):
print "Error!, not trained!"
return ()
ret = self.__GetBestTarget(cols, vals)
return ret
"""
get result of a multi-line-sample
"""
def TestMatrix(self, x, y = None):
retY = []
correct = 0
for r in range(x.nRow):
ret = self.__GetBestTarget(x.cols[x.rows[r]:x.rows[r + 1]], x.vals[x.rows[r]:x.rows[r + 1]])
retY.append(ret)
if (y <> None):
bestL = sys.maxint
bestTarget = 0
for tup in ret:
if (tup[1] < bestL):
bestL = tup[1]
bestTarget = tup[0]
if (bestTarget == y[r]):
correct += 1
if (y <> None):
print "precision : ", float(correct) / x.nRow
return retY
if __name__ == "__main__":
config = Configuration.FromFile("conf/test.xml")
PyMining.Init(config, "__global__")
matCreater = ClassifierMatrix(config, "__matrix__")
[trainx, trainy] = matCreater.CreateTrainMatrix("data/train.txt")
nbModel = TwcNaiveBayes(config, "twc_naive_bayes")
nbModel.Train(trainx, trainy)
[testx, testy] = matCreater.CreatePredictMatrix("data/test.txt")
retY = nbModel.TestMatrix(testx, testy)
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/pymining/twc_naive_bayes.py | Python | gpl3 | 5,943 |
from matrix import Matrix
from classifier_matrix import ClassifierMatrix
from segmenter import Segmenter
from py_mining import PyMining
from configuration import Configuration
class ChiSquareFilter:
def __init__(self, config, nodeName, loadFromFile = False):
self.curNode = config.GetChild(nodeName)
self.rate = float(self.curNode.GetChild("rate").GetValue())
self.method = self.curNode.GetChild("method").GetValue()
self.logPath = self.curNode.GetChild("log_path").GetValue()
self.modelPath = self.curNode.GetChild("model_path").GetValue()
self.blackList = {}
self.trained = loadFromFile
if (loadFromFile):
f = open(self.modelPath, "r")
for line in f:
self.blackList[int(line)] = 1
def SampleFilter(self, cols, vals):
if (not self.trained):
print "train filter before test"
return False
#check parameter
if (len(cols) <> len(vals)):
print "length of cols should equals length of vals"
return False
#filter sample
newCols = []
newVals = []
for c in range(0, len(cols)):
if not self.blackList.has_key(cols[c]):
newCols.append(cols[c])
newVals.append(vals[c])
return [cols, vals]
"""
filter given x,y by blackList
x's row should == y's row
@return newx, newy filtered
"""
def MatrixFilter(self, x, y):
if (not self.trained):
print "train filter before test"
return False
#check parameter
if (x.nRow <> len(y)):
print "ERROR!x.nRow should == len(y)"
return False
#stores new rows, cols, and vals
newRows = [0]
newCols = []
newVals = []
for r in range(x.nRow):
curRowLen = 0
#debug
#print "===new doc==="
for c in range(x.rows[r], x.rows[r + 1]):
if not self.blackList.has_key(x.cols[c]):
newCols.append(x.cols[c])
newVals.append(x.vals[c])
curRowLen += 1
#debug
#print PyMining.idToTerm[x.cols[c]].encode("utf-8")
newRows.append(newRows[len(newRows) - 1] + curRowLen)
return [Matrix(newRows, newCols, newVals), y]
"""
create a blackList by given x,y
@rate is a percentage of selected feature
using next formulation:
X^2(t, c) = N * (AD - CB)^2
____________________
(A+C)(B+D)(A+B)(C+D)
A,B,C,D is doc-count
A: belong to c, include t
B: Not belong to c, include t
C: belong to c, Not include t
D: Not belong to c, Not include t
B = t's doc-count - A
C = c's doc-count - A
D = N - A - B - C
and score of t can be calculated by next 2 formulations:
X^2(t) = sigma p(ci)X^2(t,ci) (avg)
i
X^2(t) = max { X^2(t,c) } (max)
@return true if succeed
"""
def TrainFilter(self, x, y):
#check parameter
if not ((self.method == "avg") or (self.method == "max")):
print "ERROR!method should be avg or max"
return False
if (x.nRow <> len(y)):
print "ERROR!x.nRow should == len(y)"
return False
#using y get set of target
yy = set(y)
yy = list(yy)
yy.sort()
#create a table stores X^2(t, c)
#create a table stores A(belong to c, and include t
chiTable = [[0 for i in range(x.nCol)] for j in range(yy[len(yy) - 1] + 1)]
aTable = [[0 for i in range(x.nCol)] for j in range(yy[len(yy) - 1] + 1)]
#calculate a-table
for row in range(x.nRow):
for col in range(x.rows[row], x.rows[row + 1]):
aTable[y[row]][x.cols[col]] += 1
#calculate chi-table
n = x.nRow
for t in range(x.nCol):
for cc in range(len(yy)):
#get a
a = aTable[yy[cc]][t]
#get b
b = PyMining.idToDocCount[t] - a
#get c
c = PyMining.classToDocCount[yy[cc]] - a
#get d
d = n - a - b -c
#get X^2(t, c)
numberator = float(n) * (a*d - c*b) * (a*d - c*b)
denominator = float(a+c) * (b+d) * (a+b) * (c+d)
chiTable[yy[cc]][t] = numberator / denominator
#calculate chi-score of each t
#chiScore is [score, t's id] ...(n)
chiScore = [[0 for i in range(2)] for j in range(x.nCol)]
if (self.method == "avg"):
#calculate prior prob of each c
priorC = [0 for i in range(yy[len(yy) - 1] + 1)]
for i in range(len(yy)):
priorC[yy[i]] = float(PyMining.classToDocCount[yy[i]]) / n
#calculate score of each t
for t in range(x.nCol):
chiScore[t][1] = t
for c in range(len(yy)):
chiScore[t][0] += priorC[yy[c]] * chiTable[yy[c]][t]
else:
#calculate score of each t
for t in range(x.nCol):
chiScore[t][1] = t
for c in range(len(yy)):
if (chiScore[t][0] < chiTable[yy[c]][t]):
chiScore[t][0] = chiTable[yy[c]][t]
#sort for chi-score, and make blackList
chiScore = sorted(chiScore, key = lambda chiType:chiType[0], reverse = True)
#add un-selected feature-id to blackList
for i in range(int(self.rate * len(chiScore)), len(chiScore)):
self.blackList[chiScore[i][1]] = 1
#output model information
if (self.modelPath <> ""):
f = open(self.modelPath, "w")
for k in self.blackList:
f.write(str(k) + "\n")
f.close()
#output chiSquare info
if (self.logPath <> ""):
f = open(self.logPath, "w")
f.write("chiSquare info:\n")
f.write("=======selected========\n")
for i in range(len(chiScore)):
if (i == int(self.rate * len(chiScore))):
f.write("========unselected=======\n")
term = PyMining.idToTerm[chiScore[i][1]]
score = chiScore[i][0]
f.write(term.encode("utf-8") + " " + str(score) + "\n")
f.close()
self.trained = True
return True
if __name__ == "__main__":
config = Configuration.FromFile("conf/test.xml")
PyMining.Init(config, "__global__")
matCreater = ClassifierMatrix(config, "__matrix__")
[trainx, trainy] = matCreater.CreateTrainMatrix("data/tuangou_titles3.txt")
chiFilter = ChiSquareFilter(config, "__filter__")
chiFilter.TrainFilter(trainx, trainy)
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/pymining/chisquare_filter.py | Python | gpl3 | 6,923 |
import math
import pickle
import sys
from matrix import Matrix
from classifier_matrix import ClassifierMatrix
from segmenter import Segmenter
from py_mining import PyMining
from configuration import Configuration
from chisquare_filter import ChiSquareFilter
from twc_naive_bayes import TwcNaiveBayes
if __name__ == "__main__":
config = Configuration.FromFile("conf/test.xml")
PyMining.Init(config, "__global__")
matCreater = ClassifierMatrix(config, "__matrix__")
[trainx, trainy] = matCreater.CreateTrainMatrix("data/train.txt")
chiFilter = ChiSquareFilter(config, "__filter__")
chiFilter.TrainFilter(trainx, trainy)
nbModel = TwcNaiveBayes(config, "twc_naive_bayes")
nbModel.Train(trainx, trainy)
[testx, testy] = matCreater.CreatePredictMatrix("data/test.txt")
[testx, testy] = chiFilter.MatrixFilter(testx, testy)
retY = nbModel.TestMatrix(testx, testy)
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/pymining/test.twc_naive_bayes_train_test.py | Python | gpl3 | 907 |
#coding:utf-8
import sys
a=u"""3 工程师 Done.
1 php Done.
5 php 工程师 Done.
2 设计师 Done.
6 视觉设计 Done.
7 产品经理 Done.
9 web Done.
10 编辑 Done.
11 实习生 Done.
12 产品 Done.
13 交互设计 Done.
8 产品设计 Done.
18 java Done.
19 UI Done.
22 销售 Done.
25 医药代表 Done.
24 java php Done.
29 gongzhuo Done.
17 c++ Done.
30 css Done.
39 程序架构师 Done.
41 SUNCR2008 Done.
38 百图 Done.
43 张彦路 Done.
40 百图互动传媒,重金诚聘PHP/.NET程序架构师多名。百图,意味着凭借所知所能所作所为,在新的领域,以新的方式,为您诠释固有的产品。 所知、所能、所作、所为,无所不在,无所不能――百图(PATO) Done.
42 策划 Done.
44 百度 Done.
45 北京 运营 Done.
47 脱发 Done.
49 ued Done.
50 广州 生物 Done.
48 我是一名软、硬件网络全能工程师。。涉及领域:asp.net Java php等语言技术 Done.
52 应届生 Done.
53 陈莹 Done.
54 elya Done.
36 助理 Done.
37 兼职 Done.
59 长春 Done.
56 视频编辑 Done.
58 校园招聘 Done.
46 招聘经理 Done.
57 视频 Done.
51 生物 Done.
60 移动 Done.
55 悲剧 Done.
65 呼叫中心运营经理 Done.
64 呼叫中心 Done.
66 运营经理 Done.
63 产品专员 Done.
71 管家婆 Done.
69 PHP工程师 Done.
72 数据库 Done.
73 瀹炰範鐢 Done.
70 用友 Done.
61 深圳 Done.
74 广告传播 Done.
80 策划 成都 Done.
78 出国劳务 Done.
81 成都 Done.
77 出国 Done.
76 linux 运维 Done.
75 linux Done.
79 运维 Done.
83 央视 Done.
82 JS Done.
87 百度无线 Done.
86 前端 Done.
62 产品助理 Done.
90 shenzhen Done.
91 groovy Done.
93 金山 PHP Done.
92 金山 Done.
84 cgi Done.
89 阿里巴巴 Done.
97 前端工程师 厦门 Done.
94 支付宝 Done.
98 UI设计 上海 Done.
85 动漫 Done.
88 长乐 Done.
95 开发经理 Done.
99 网页设计 Done.
100 网页设计 兼职 Done.
96 经理 Done.
101 pmcaff Done.
105 UI,视觉设计 Done.
103 gps Done.
106 UI设计 Done.
107 UI设计 北京 Done.
104 qt Done.
108 淘宝 Done.
109 excel Done.
110 工程师 C# Done.
112 ruby Done.
111 产品 招聘 Done.
113 UI设计师 Done.
114 UE Done.
115 产品经理助理 Done.
120 博彦科技 Done.
119 搜狐 Done.
121 c# Done.
123 寻ui+制作高手兼职 Done.
117 汽车 模型 Done.
116 汽车 Done.
118 搜狗 Done.
122 工业设计 Done.
126 缂栬緫 Done.
125 深圳+ui Done.
124 深圳 ui Done.
127 机器人 招聘 Done.
129 机器人 Done.
130 盛大创新院 Done.
134 17huryfnf hfgfhdgt Done.
128 招聘 机器人 Done.
133 糖衣炮弹 Done.
135 17huryfnf hfgfhdgt$ Done.
131 机械 Done.
139 what? Done.
140 jj Done.
141 瀹炰範鐢 Done.
142 交互设计UI Done.
143 city:深圳 cate:产品经理 Done.
145 fdsa Done.
146 包子 Done.
144 实习生 北京 Done.
136 前端开发 Done.
102 gis Done.
137 2 Done.
138 xxx Done.
147 首席架构师 Done.
151 解放碑 Done.
153 交互设计+上海 Done.
149 广州 销售 Done.
148 广州 产品经理 Done.
152 广州 Done.
150 内容编辑 Done.
155 视觉设计 杭州 Done.
154 python Done.
161 应聘JS Done.
162 瀹炰範鐢 Done.
160 数据仓库 java Done.
159 数据仓库 Done.
157 clothhr@163.com Done.
158 深圳 java Done.
164 佳木斯 Done.
169 erp Done.
168 seo Done.
156 产品+招聘 Done.
167 采购 Done.
165 策划 上海 Done.
166 物流 Done.
170 div+css Done.
171 你好 Done.
173 天津 seo Done.
172 浜や簰璁捐? Done.
175 天津 网络推广 Done.
174 天津 Done.
178 兼职 客服 Done.
177 东莞 招聘 Done.
176 市场 Done.
179 律师 Done.
181 设计 Done.
183 ruby on rails Done.
182 龙元建设 Done.
187 科技记者 Done.
186 科技编辑 Done.
163 职业欠钱 Done.
180 中国 Done.
184 翻译 Done.
185 产品经理 上海 Done.
190 网站策划 上海 Done.
193 BA Done.
195 business Done.
194 business ana Done.
196 analyst Done.
191 腾讯 Done.
198 建筑软件 Done.
192 技术总监 Done.
188 科技 Done.
189 产品策划 上海 Done.
197 分析 Done.
204 IT Done.
203 伟大公关 Done.
200 应届生 运维 Done.
201 中华英才网 Done.
208 英语 Done.
202 建筑 Done.
207 公关 Done.
209 系统分析 Done.
199 sap Done.
205 伟达公关 Done.
206 分析师 Done.
215 蓝驰 Done.
216 .net Done.
210 产品经理 深圳 Done.
217 技术经理 Done.
211 seo 福州 Done.
219 找工作就来这里吧。 Done.
214 手机 Done.
218 游戏策划 Done.
221 深圳外贸业务员 Done.
212 青岛 Done.
224 数字出版 Done.
225 出版 Done.
226 BD Done.
227 长沙 Done.
228 金融 Done.
230 微伯乐 Done.
222 .net 工程师 Done.
213 JavaScript Done.
220 外贸业务员 Done.
223 网络工程师 Done.
232 宁波 Done.
229 视觉设计 宁波 Done.
236 招聘 Done.
234 优客 Done.
237 魅族 Done.
235 生物信息 Done.
231 运维工程师 Done.
239 UI经理 Done.
240 UI总监 Done.
242 社区运营 Done.
241 室内 Done.
233 运维工程师 sina Done.
244 交互 Done.
245 卡乐购 Done.
238 iphone Done.
243 社区 Done.
250 上海团购网 Done.
246 盛大在线 Done.
249 本多 Done.
251 音乐 Done.
256 邮局 Done.
252 网站分析 Done.
247 Flash Done.
254 分析 上海 Done.
248 手办 Done.
253 医疗 Done.
257 企业邮箱 Done.
259 sa Done.
262 售前 Done.
258 会计 Done.
263 邮件 Done.
261 软件售前 Done.
267 产品经理 广州 Done.
260 系统管理员 Done.
265 环保 Done.
255 财务 Done.
269 flash lite Done.
264 广州 java Done.
272 校园 产品经理 Done.
266 环境工程 Done.
274 上海 Done.
270 北京 Done.
276 ccna Done.
278 威海 Done.
277 济南 Done.
279 HCI Done.
268 网站美工 Done.
280 django Done.
281 租房 Done.
282 出租 Done.
284 房源 Done.
283 as Done.
285 广州 市场 Done.
275 产品总监 Done.
287 php 深圳 Done.
289 ued 上海 Done.
288 php 上海 Done.
291 新浪微博招聘PHP高级开发工程师!!! Done.
273 產品 Done.
290 ued 北京 Done.
292 ror Done.
271 微博 Done.
297 婚礼策划 Done.
298 婚礼 Done.
294 新鲁尼 Done.
296 心理学 Done.
293 电子商务 Done.
299 婚策 Done.
295 心理 Done.
302 新浪薪水 Done.
303 软件测试 Done.
305 杭州 Done.
307 苏州 Done.
300 酒店销售 Done.
304 上海 java Done.
301 新浪产品薪水 Done.
308 国泰君安 Done.
306 网络工程 Done.
286 php 北京 Done.
313 外贸 Done.
312 人力资源 Done.
311 薪资主管 Done.
310 薪酬主管 Done.
315 沈阳 Done.
314 百度 php Done.
316 fsf Done.
320 city:北京;cate:网站编辑 Done.
318 兰州新东方 Done.
319 city:北京 cate:网站编辑 Done.
317 兰州新东方招聘 Done.
309 诚聘t.163.com的PM Done.
325 callcenter Done.
322 产品经理 招聘 Done.
323 北京 网站编辑 Done.
321 为获新知闯天下 Done.
324 df Done.
327 20k Done.
326 15k Done.
328 南京实习生 Done.
333 北京 php Done.
334 产品经理 助理 Done.
337 配置管理 Done.
335 东莞 Done.
336 搜索研发 Done.
331 产品经理 北京 Done.
339 版本管理 Done.
341 12580 Done.
340 应届 Done.
338 管理 Done.
342 平面设计 Done.
330 瀹炰範鐢 Done.
343 杭州 前端 Done.
345 诚聘:韩语技术支持工程师-上海/北京/天津/大连 Done.
347 sohu Done.
348 网易 Done.
349 掰断 Done.
346 新浪 Done.
344 总监 Done.
350 测试 Done.
332 记者 Done.
354 上海 产品 Done.
352 淘米 Done.
353 实习 Done.
357 新浪微博API2 Done.
358 招聘工程师 Done.
359 招聘 工程师 Done.
355 活动 策划 Done.
356 数据挖掘 Done.
360 建筑建模 Done.
351 郑州 Done.
363 mysql Done.
365 前台 Done.
361 缴费 Done.
367 abc Done.
366 小姐 Done.
368 外包 网站 Done.
364 项目 网站 Done.
369 招标 网站 Done.
362 非 Done.
373 event manager Done.
372 event Done.
370 招标 Done.
376 峰会 Done.
371 外包 Done.
379 软件开发 Done.
377 插画助理 Done.
374 会议 Done.
380 物流 上海 Done.
375 论坛 Done.
384 常州 Done.
383 大连 Done.
385 e-learning Done.
381 福州 php Done.
382 交互 北京 Done.
386 学习 Done.
329 南京 Done.
378 数据 挖掘 Done.
391 窝窝团 Done.
390 上海 前端 Done.
388 产品运营 Done.
392 产品规划 Done.
393 广东 Done.
387 木匠 Done.
395 青岛 产品经理 Done.
396 厦门 Done.
400 数码印花 Done.
401 hr Done.
394 ajax Done.
399 老罗 Done.
397 教育 Done.
398 新东方 Done.
402 网站市场推广 Done.
404 android Done.
405 一起手游 Done.
389 交互设计师 Done.
407 马云 Done.
408 c Done.
409 基金 Done.
412 服装设计 Done.
406 李刚 Done.
410 投资 Done.
403 市场推广 Done.
411 股票 Done.
419 city:深圳 cate:程序员 Done.
418 hiall Done.
420 city:北京 cate:程序员 Done.
422 city:北京 cate:产品经理 Done.
421 city:北京 cate:c 程序员 Done.
414 体育经纪 Done.
423 实习生 阿里 Done.
417 重庆 Done.
425 王菲 Done.
426 斯蒂芬 Done.
427 愚公移山 Done.
428 工业控制 plc Done.
429 plc Done.
431 外贸业务iyuan Done.
430 西门子 Done.
424 实习生 淘宝 Done.
413 体育 Done.
434 微博运营实习生 Done.
435 二手房 Done.
436 php,北京 Done.
432 广告产品经理 Done.
433 新浪微博运营实习生 Done.
415 记者 媒体 Done.
416 媒体 Done.
437 php+北京 Done.
440 傻逼 Done.
444 寒假 实习 Done.
445 寒假 Done.
442 惠州 Done.
443 游戏 Done.
439 CCNP Done.
438 王微 Done.
450 啊狸 Done.
447 北京 实习 Done.
448 武汉 新闻 Done.
452 phpppp Done.
451 marcom Done.
446 假期 Done.
441 惠诈 Done.
449 新闻 Done.
456 熙康 Done.
458 嵌入式 Done.
455 杭州 UI Done.
457 东软 Done.
454 杭州 GUI Done.
461 主编 Done.
463 南京 UI Done.
464 法律 Done.
465 f Done.
466 招聘 电视记者 Done.
462 内容 Done.
467 招聘 mac Done.
471 创新工场 Done.
470 法语 Done.
460 新媒体 Done.
459 后台开发 Done.
469 php 杭州 Done.
476 兼职 杭州 Done.
474 达彼思 Done.
472 美工 Done.
473 4A Done.
475 google Done.
479 格力 Done.
478 微简历 Done.
477 #求职# Done.
481 北京 媒体 Done.
483 北京 无线 Done.
484 北京 杂志 Done.
482 北京 新媒体 Done.
485 化工 Done.
486 培训生 Done.
487 管理培训生 Done.
488 销售经理 Done.
468 招聘 苹果 Done.
480 总监 北京 Done.
489 Mac Done.
492 海南 Done.
494 博鳌 Done.
493 海口 Done.
495 大师 Done.
496 老沉 Done.
491 卫生 Done.
453 网络安全 Done.
490 预防医学 Done.
499 web前端 杭州 Done.
497 宽连十方 Done.
502 数据产品经理 Done.
505 工作营 Done.
498 web前端 Done.
503 lucene Done.
507 求职 交互设计 Done.
506 应聘 交互设计 Done.
504 搜索 Done.
500 前端 杭州 Done.
512 环评 Done.
509 oracle Done.
508 上海 交互设计师 Done.
510 营销 Done.
501 网络营销 Done.
515 音樂 Done.
517 凡客诚品 Done.
518 秘书 Done.
514 射频 Done.
519 图书 Done.
511 杂志 Done.
516 音 Done.
524 上海 媒体 Done.
522 社会化媒体营销 Done.
523 媒体 ps 影视制作 Done.
525 无锡 Done.
526 财务总监 Done.
527 人力资源经理 Done.
521 法务 Done.
513 交通 Done.
520 猎头 Done.
532 无线产品经理 Done.
533 移动产品经理 Done.
534 客户端 产品经理 Done.
535 长沙 招聘 Done.
536 手机 产品经理 Done.
537 安全 Done.
539 PROE Done.
540 Pro/E Done.
538 机械设计 Done.
530 KA Done.
543 平面设计 无锡 Done.
541 乳 Done.
542 运营 Done.
531 美容编辑 Done.
544 绍兴 Done.
545 cate:java工程师 city:北京 Done.
549 南通 Done.
550 实习生 南京 Done.
547 delphi Done.
548 自动化 Done.
553 绵阳 Done.
551 证券 Done.
546 数值 Done.
552 推广 Done.
554 保险 Done.
557 asdfsf Done.
560 深圳 网站 Done.
558 搜索引擎 Done.
556 美丽 Done.
555 园林 Done.
564 广州 市场经理 Done.
563 广州市场经理 Done.
561 深圳 网站编辑 Done.
559 网站 Done.
565 电商运营 Done.
566 韩国语 Done.
567 韩语 Done.
569 酒店 Done.
571 IT业 Done.
570 本地化 Done.
568 校园 Done.
572 元器件 Done.
575 smm Done.
574 软件 Done.
573 芯片 Done.
562 市场经理 Done.
528 技术支持 Done.
529 模特 Done.
577 长沙求职 Done.
581 微博求职 Done.
580 求职 Done.
582 日本 Done.
576 sns Done.
583 测试工程师 Done.
578 交互设计师 北京 Done.
579 社会化 Done.
587 剪辑师 Done.
586 99 Done.
588 北京 java Done.
585 sem Done.
592 实习生 插画 Done.
590 上海 助理 Done.
591 电子 Done.
595 手机游戏 广州 Done.
584 AE Done.
594 画师 Done.
597 人设 Done.
596 图书馆 Done.
599 人物设计师 Done.
598 人 设 Done.
603 maya Done.
589 开放 Done.
593 插画 Done.
605 NLP Done.
606 sueveannal@theknot.com Done.
604 动画 Done.
607 商务智能 Done.
609 上海 大专 Done.
610 记者站 Done.
611 记者 广州 Done.
608 BI Done.
613 西安 机械 Done.
614 互动营销客户经理 Done.
616 互动媒介经理 Done.
600 实习生 原画 插画 人物设计 Done.
617 互动客户经理 Done.
612 西安 Done.
618 互动 客户经理 Done.
621 房地产 Done.
615 互动营销媒介经理 Done.
619 业务员 Done.
623 asp.net Done.
624 实习生 媒体 Done.
622 房地产 广州 Done.
625 实习生 新闻 Done.
601 3D Done.
627 实习生 报社 Done.
628 实习生 报纸 Done.
629 asp.net 深圳 Done.
630 旅游策划 Done.
631 旅游 Done.
633 腾讯nlp Done.
634 asd Done.
632 美女 Done.
626 实习生 网站 Done.
620 163 Done.
636 公务员 Done.
637 模特儿 Done.
639 徐中一 Done.
638 掌上百度 Done.
641 招聘 四川 Done.
640 壁虎 Done.
644 空姐 Done.
642 交互实习生 Done.
643 苍井空 Done.
645 快乐的阅读 Done.
647 大连 地产 Done.
635 教师 Done.
650 test Done.
646 快乐阅读 Done.
648 信息安全 Done.
649 自然语言处理 Done.
652 广州 电子商务 Done.
654 内容处理 Done.
656 招聘 北京大麦网 前端工程师 Done.
655 内容分析 Done.
653 世界地图 Done.
658 产品经理 财经 Done.
659 产品经理 证券 Done.
651 网页设计师 Done.
660 产品经理 股票 Done.
662 实习生 土木工程 Done.
663 实习生 土木 Done.
657 策划 无线 Done.
665 实习生建筑 Done.
668 哈尔滨 实习 Done.
664 实习生 建筑 Done.
666 土木工程 Done.
670 福州 Done.
667 PHP 广州 Done.
669 新闻 实习 Done.
673 VC 投资 Done.
675 德语 Done.
672 VC Done.
661 杭州招聘 Done.
671 数据 Done.
676 红枣 Done.
678 交互设计 北京 Done.
679 网易招聘 Done.
681 腾讯扎好哦品 Done.
683 新浪招聘 Done.
682 腾讯招聘 Done.
684 百度招聘 Done.
674 笔译 Done.
680 招产品 Done.
685 招聘主管 Done.
677 榆林 Done.
687 实施经理 Done.
690 cate:交互设计师,city:上海 Done.
686 eam Done.
689 cate:交互设计师 city:上海 Done.
693 泰语 Done.
692 客户经理 Done.
691 高级产品经理 Done.
694 实习生 汽车 Done.
688 项目经理 Done.
698 福建 酒 Done.
695 泰国 Done.
697 松江 Done.
701 dba Done.
699 福建 营销经理 Done.
700 福建 销售经理 Done.
703 移动通信 Done.
702 页面制作 Done.
704 投资 证券 Done.
708 风水师 Done.
707 武汉 Done.
709 太原 Done.
696 人事 Done.
706 投资 分析师 Done.
712 广告公司实习 Done.
713 实习 广州 Done.
714 肉丝 Done.
711 广告公司 Done.
716 安利 Done.
717 宝洁 Done.
715 医药 Done.
719 药品注册 Done.
718 交互设计 实习 Done.
721 数据库管理员 Done.
722 网络 Done.
705 投资 经理 Done.
720 注册 Done.
724 cisco Done.
723 思科 Done.
728 芜湖 Done.
729 自动化测试 Done.
727 andriod Done.
725 广告 Done.
726 模具 Done.
602 全部招聘 php 编辑 产品经理 交互设计 视觉设计 实习生 产品 产品设计 java Done.
732 山西 实习生 Done.
730 QTP Done.
731 自动测试 Done.
737 二书 Done.
738 豆豆猫 Done.
736 美容师 Done.
739 statusnet Done.
740 景观设计 Done.
741 园林设计 Done.
742 平面媒体 Done.
733 广州地区 Done.
710 公司名称:北京数字天堂信息科技有限责任公司 职位名称:UI设计师 人数:2人 薪资:面谈 职位要求:偏手机界面UI设计,要求会网页设计。 Done.
735 敢死队 Done.
744 内容总监 Done.
748 纳米 Done.
749 oracl Done.
750 广州 实习 linux Done.
747 上海 金融 Done.
746 前端 上海 Done.
734 会计 泉州 Done.
753 rtsp Done.
752 live555 Done.
751 广州 实习 Done.
754 视频流 Done.
755 流媒体 Done.
756 特殊工作 Done.
758 倒萨 Done.
760 ‘ Done.
757 工作 Done.
745 摄影 Done.
743 媒体 网站 Done.
776 大同 Done.
778 人人呢 Done.
779 人人 Done.
774 交互设计 北京 三元桥 Done.
781 应届生 深圳 Done.
775 交互设计 太阳宫 Done.
780 应届生 广州 Done.
782 南宁 Done.
783 媒介经理 Done.
786 a Done.
787 b Done.
785 游戏 媒介经理 Done.
784 游戏媒介经理 Done.
773 mtk Done.
788 HR伴侣 Done.
794 我们都是好孩子 Done.
795 设计师 深圳 Done.
790 %你好% Done.
797 云阳 Done.
777 jsp Done.
798 万州 Done.
800 上海 策划 Done.
799 沙坪坝 Done.
802 主编经验 Done.
801 宽途 Done.
803 大刊 Done.
805 时尚 Done.
806 著名互联网公司、nadaq上市,LAMP工程师招聘,工作地点:北京 Done.
796 产品总监 北京 Done.
804 时尚杂志 Done.
807 研发工程师 Done.
810 士大夫 Done.
812 nadaq Done.
809 豆腐干 Done.
816 机器视觉 Done.
811 发 Done.
815 计算机视觉 Done.
814 java工程师 Done.
808 热 Done.
813 服务员 Done.
817 模式识别 Done.
824 用户体验 北京 朝阳 Done.
823 IBM Done.
822 会展 Done.
825 用户体验 朝阳 Done.
827 英语 南京 Done.
820 创业 Done.
828 lbs Done.
829 峰会策划 Done.
831 会议策划 Done.
832 会议 上海 Done.
826 英语流利 Done.
819 年薪 Done.
821 银行 Done.
830 活动策划 Done.
836 编辑 成都 Done.
834 photoshop Done.
840 应届硕士 Done.
835 导游 Done.
839 成都编辑 Done.
838 成都 编辑 Done.
837 人事主管 Done.
841 应届硕士招聘 Done.
844 深圳文案 Done.
846 程序员 Done.
845 大姚 Done.
843 文案 Done.
847 java 上海 Done.
849 biostatistician Done.
851 sas Done.
850 药物经济 Done.
848 ue 80 Done.
842 旅游记者 Done.
854 android 百度 Done.
855 广州 记者 Done.
856 android 实习生 Done.
833 产品 实习生 Done.
859 翻译 长沙 Done.
858 审计 Done.
860 交互 设计师 Done.
862 销售 空调 Done.
863 产品 经理 Done.
853 微博推广专员5名,专职月薪2000元 提成,兼职月薪1000元 提成。要求:注册微博客1年以上,关注100人以上,粉丝数1000以上,经常上网,泡论坛、写博客;有过公关公司、媒体公司、营销公司工作经验优先。邮件:uvw002@163.com Done.
789 全部招聘 php 编辑 产品经理 交互设计 视觉设计 实习生 产品 产品设计 Done.
852 统计 Done.
867 rails Done.
868 编辑 西安 Done.
865 自然语言 处理 Done.
866 cate : 营销 经理 city 北京 Done.
871 西安 行政 Done.
870 西安行政 Done.
872 西安 网站 Done.
873 咨询顾问 Done.
874 交互 设计 Done.
869 网站 业务 Done.
875 新东方 招聘 产品 经理 Done.
876 新东方 产品 经理 Done.
880 生物 医学 工程师 Done.
877 臧知昶 Done.
882 leed Done.
879 招聘信息 Done.
881 搜索 研发 工程师 Done.
878 iOS 系统 招聘 导航 软件开发 人员 Done.
857 会计师 Done.
885 架构师 Done.
886 娱乐 Done.
861 请 各位 帮忙 转播 推荐 呀 Done.
891 广州 助理 Done.
890 广州助理 Done.
888 文员 广州 Done.
889 广州 行政 Done.
892 怀旧 Done.
887 文员 Done.
893 飞机 Done.
894 营销 经理 Done.
864 界面 设计师 一名 请 各位 帮忙 转播 推荐 呀 Done.
902 supporting Done.
903 法律 实习生 Done.
905 web 前端 Done.
904 招聘:b2b销售经理,有电子商务销售管理经验优先,联系qq:408378857 e-mai:tianxf@gasgoo.com Done.
906 经济学 Done.
907 硕士 Done.
901 英语助教 Done.
900 新浪网 php 工程师 系统 架构 师 Done.
909 郑州 迪士尼 儿童 15938737424 地点 富田 太阳城 一站 站 广场 Done.
899 php 程序员 Done.
911 工业 工程师 Done.
908 用户体验 Done.
912 商务 Done.
914 聯網 Done.
913 彩铃运营 Done.
919 英语 广州 Done.
916 客户端 产品 经理 Done.
920 英语 八级 Done.
918 网站推广 Done.
915 无线 手机 产品 Done.
917 手机 产品 经理 Done.
921 izenesoft Done.
926 实习生 会计 Done.
922 电气 Done.
924 核工程 Done.
923 地球化学 Done.
925 交互设计 上海 Done.
928 外贸 厦门 Done.
927 会计 上海 Done.
929 互联网 分析师 Done.
930 商业 分析师 Done.
932 系统维护 Done.
934 @ Done.
883 产品 经理 一名 市场推广 SEO 方向 文案 策划 前端 设计师 时尚 健康 类 的 电子 商场 项目 招聘 Done.
931 网页 设计师 Done.
933 937 bambook Done.
转发 Done.
935 市场营销 Done.
936 网站运营 Done.
942 汉语 Done.
910 迪士尼 儿童 15938737424 地点 郑州 富田 太阳城 一站 站 广场 Done.
945 平面 设计师 Done.
940 project manager Done.
939 acca Done.
941 对外汉语 Done.
943 计算语言 Done.
949 lsb Done.
950 网页前台 Done.
951 前台设计 Done.
948 运营助理 Done.
944 系统 工程师 Done.
952 诚聘 Done.
946 系统架构 Done.
955 民生银行 Done.
956 阜新 Done.
957 坪山 Done.
958 深圳龙岗 Done.
959 龙岗 Done.
954 文案策划 Done.
962 java 杭州 Done.
963 依娃璇子 Done.
953 俱乐部 Done.
938 品牌经理 Done.
961 产品 经理 客户端 Done.
960 JAVA 架构 师 Done.
964 找c 服务器端开发人员,windows平台,熟悉分布式设计,流处理设计,薪水从优 Done.
966 公司招聘 设计师 Done.
967 OpenGL 实习生 Done.
968 OpenGL Done.
965 江青 Done.
969 android 北京 Done.
974 网络兼职 Done.
975 储运经理 Done.
973 j2ee Done.
972 市场专员 Done.
970 微博招聘 Done.
971 风险 Done.
947 系统 架构 师 Done.
978 java 工程师 Done.
981 巨人 Done.
979 王国 Done.
982 文理兼通 Done.
983 文理 Done.
985 姜沈励 Done.
986 苏州采购 Done.
984 逻辑 Done.
976 售后 Done.
977 等等 Done.
980 五 Done.
989 精算师 Done.
992 twitter Done.
993 珠海 Done.
987 供应链 Done.
995 温州 Done.
991 网站编辑 Done.
990 英才网 Done.
994 ios Done.
997 金华 Done.
988 北京 会计 Done.
999 防盗门 Done.
1000 三国 Done.
1003 analytics Done.
1002 google analytics Done.
1001 青岛招聘 Done.
1004 市场尽力 Done.
1005 scala Done.
1008 公关总监 Done.
1007 安踏 Done.
996 义乌 Done.
1006 什么 Done.
1009 江 Done.
1014 #招聘# Done.
1013 seo 广州 Done.
998 scooter Done.
1010 WPF Done.
1012 的 Done.
1011 silverlight Done.
1021 广州 SEO Done.
1020 360 Done.
1016 #光谷# Done.
1018 net Done.
1019 php 郑州 Done.
1017 456 Done.
1015 高级 Done.
1024 sns 杭州 Done.
1026 关心网 Done.
1030 设计员 Done.
1029 网游 Done.
1025 自然语言 Done.
1027 杭州 实习生 Done.
1022 公司 Done.
1031 设计员 南京 Done.
1023 人力资源 经理 Done.
1032 实习生 郑州 Done.
1028 玉米 Done.
1036 开心网 Done.
1034 新浪微博 Done.
1035 人人网 Done.
1037 文员 北京 Done.
1038 厦门 php Done.
1033 惠城 Done.
1041 and 1 Done.
1042 order by 10 Done.
1043 1 and Done.
1044 <> Done.
1046 script alert a Done.
1040 sdgf Done.
1048 新浪 交互 设计师 了 Done.
1049 联发科技 Done.
1052 recruiting Done.
1051 产品 专员 上海 Done.
1050 报关 Done.
1055 广州 校园招聘 Done.
1057 插画师 Done.
1056 见 Done.
1053 应聘 设计师 Done.
1054 产品 经理助理 Done.
1045 script Done.
1047 新浪 交互 设计师 Done.
1058 广州 文员 Done.
1060 net 成都 Done.
1061 艺助 Done.
1062 艺人助理 Done.
1065 足浴技师 Done.
1059 广州文员 Done.
1064 产品 设计师 Done.
1069 会计 大连 Done.
1070 到底 Done.
1066 足浴 Done.
1073 深圳 Symbian Done.
1067 足疗 Done.
1071 君隆 Done.
1075 北京 公关 Done.
1077 时尚集团 Done.
1074 深圳 php Done.
1072 人力 Done.
1076 总编 Done.
1078 现代传播 Done.
1079 瑞丽 Done.
1082 PR Done.
1084 平媒 Done.
1080 桦榭 Done.
1083 平媒经历 Done.
1088 solr Done.
1087 cate Done.
1086 斯坦尼康 Done.
1085 PD Done.
1081 周刊 Done.
1090 广州 新浪 Done.
1092 2011、 Done.
1094 d Done.
1095 们公 Done.
1089 山东浪潮齐鲁软件产业股份有限公司诚聘优秀软件工程师应届毕业生,资深软件工程师、软件测试工程师、嵌入式软件工程师、GIS/GPS软件工程师、单片机软件工程师、数据库开发工程师、网络工程师、高级JAVA软件工程师、高级.NET软件工程师、高级C 软件工程师、项目经理、销售总监 Done.
1093 2011 Done.
1096 1-2 Done.
1099 信社区产 Done.
1100 信共 Done.
1101 动互联 Done.
1091 上海 交互 Done.
1103 银联 Done.
1104 内容运营 Done.
1105 互联网 产品 Done.
1102 急招 Done.
1106 残疾 Done.
1068 界面 设计师 一名 请 帮忙 Done.
1107 网页设计 广州 Done.
1108 人事 广州 Done.
1110 网页 设计师 广州 Done.
1109 行政 广州 Done.
1111 56 Done.
1112 家具设计 Done.
1113 arm Done.
1116 360安全 Done.
1115 新葵互动 Done.
1114 人民 Done.
1063 区域 经理 市场营销 人员 人 项目 河南 许继 仪表 有限公司 详情 请 http db dqjob 88 com vvip cm 1277951335735 2 更多 信息 www job 1001 查看 Done.
1117 分布式 Done.
1118 说 Done.
1121 网络 工程师 Done.
1122 阿里巴巴 产品 Done.
1120 c 方向 Done.
1119 实习生 java Done.
1123 淘宝 产品 Done.
1125 广州 外企 Done.
1126 广州 媒 Done.
1127 产品 广州 Done.
1128 情报学 Done.
1124 产品设计 上海 Done.
1133 产品 上海 Done.
1130 产品 经理 北京 Done.
1129 北京 交互 Done.
1134 移动支付 Done.
1136 sheying Done.
1138 nike Done.
1137 北京 产品 经理 Done.
1132 实习生 杭州 Done.
1135 互联网 Done.
1098 有没有 弟弟 妹妹 软件开发 要 找工作 Done.
1139 nike 6.0 Done.
1140 hjghj Done.
1142 河南 Done.
1143 监理 Done.
1146 chanpin Done.
1141 flex Done.
1145 隧道 Done.
1144 隧道监理 Done.
1097 有没有 弟弟 妹妹 软件开发 需要 找工作 Done.
1147 chanpinsh Done.
1152 南昌那个 Done.
1151 实习生 上海 Done.
1153 南昌 Done.
1148 chanping Done.
1149 风水 Done.
1150 产品 经理 上海 Done.
1156 模拟设计 Done.
1159 美国 Done.
1158 传播学 Done.
1160 上海 php Done.
1157 模拟 Done.
1163 塘沽 Done.
1155 日文 Done.
1161 奇虎360 Done.
1162 副总 Done.
1168 交互 天津 Done.
1165 电脑 Done.
1164 电脑技术 Done.
1166 雕蜡 Done.
1167 北京 net Done.
1169 焊接 Done.
1172 wordpress Done.
1171 北京 机械 Done.
1174 许利雄 Done.
1170 北京 类 Done.
1173 模具设计 Done.
1175 百纳 Done.
1178 北京 手机 gui Done.
1179 北京 gui Done.
1180 台湾 Done.
1176 gui Done.
1181 php 经理 北京 Done.
1177 手机 gui Done.
1154 汽车 上海 Done.
1183 微软中国 Done.
1186 重庆 网站 Done.
1187 品质管理 Done.
1185 adobe Done.
1190 实习生 山西 Done.
1188 老师 Done.
1182 微软 Done.
1191 山西 Done.
1189 运营总监 Done.
1195 电视 广州 Done.
1192 bs Done.
1194 广州 媒体 Done.
1193 阿里巴巴 国际 站 Done.
1196 电视广州 Done.
1197 广州 电视 Done.
1200 上海 设计师 Done.
1199 上海 前端 设计师 Done.
1198 广州电视 Done.
1201 北京 C Done.
1203 北京 ajax Done.
1205 UED 经理 Done.
1204 marketing Done.
1206 北京 android Done.
1184 飞信 Done.
1202 山东 Done.
1207 上海 android Done.
1209 广州 手机游戏 Done.
1131 全音 乐组 的人 人去 嗨歌 歌 耶耶 给 队长 过 生日 Done.
1214 webex Done.
1210 广州 儿童 Done.
1208 广州 手机 Done.
1217 编辑 北京 Done.
1218 Lotus Done.
1216 彳 Done.
1212 腾讯微博 Done.
1211 广州 产品 经理 Done.
1213 hadoop Done.
1215 新浪 编辑 Done.
1220 Domino Done.
1224 用户 上海 Done.
1223 交互 上海 Done.
1219 Notes Done.
1226 yoka Done.
1222 优视 Done.
1225 编辑 济南 Done.
1227 新浪编辑 Done.
1230 季 Done.
1221 UC Done.
1232 福建 Done.
1235 编辑 广州 Done.
1231 招贤纳士 Done.
1229 投资银行 Done.
1239 枫华创益 Done.
1233 微博 博 招聘网 Done.
1234 李开复 Done.
1236 投资经理 Done.
1228 信托 Done.
1242 xhso Done.
1243 kl Done.
1238 百事 Done.
1240 明星 Done.
1245 poMars Zheng Done.
1241 歌手 Done.
1244 po Done.
1249 缸/淋浴 Done.
1251 青岛 暖 Done.
1250 宝 Done.
1246 perl Done.
1237 联合利华 Done.
1252 胡锦涛 Done.
1256 上海会计 Done.
1255 上海财务 Done.
1258 上海 设备 工程师 Done.
1254 android 广州 Done.
1257 设备 工程师 Done.
1260 上海 设备工程师 Done.
1259 分析员 Done.
1247 语言 Done.
1253 采购经理 Done.
1265 建安大 Done.
1264 瑞典 Done.
1263 瑞士 Done.
1262 法国 Done.
1266 加拿大 Done.
1267 比利时 Done.
1269 芬兰 Done.
1268 卢森堡 Done.
1270 北欧 Done.
1272 西班牙 Done.
1261 osgi Done.
1271 意大利 Done.
1277 网站管理 Done.
1276 外贸 广州 Done.
1274 外貿 Done.
1279 网络管理员 Done.
1278 网管 Done.
1281 广东 php Done.
1280 春 分立 秋冬 至 Done.
1273 公益 Done.
1282 甘肃 php Done.
1275 外贸 州 Done.
1283 新疆 php Done.
1248 丁香 数据库 工程师 MySQL DBA Done.
1284 揭阳 php Done.
1289 Mars Zheng Done.
1291 桂林 Done.
1288 39健康网 Done.
1287 游戏 工程师 广州 Done.
1290 北京 产品 设计师 Done.
1295 用户研究 Done.
1292 中山 Done.
1296 iphone 深圳 Done.
1297 mba Done.
1299 dresses Done.
1300 groupon Done.
1298 lashou Done.
1301 51job Done.
1305 city 杭州 Done.
1302 lightinthebox Done.
1294 d 5 Done.
1285 广东 php 工程师 Done.
1307 mongodb Done.
1306 nosql Done.
1308 监测 Done.
1304 cate 软件测试 city 杭州 Done.
1310 客服 Done.
1303 b2c Done.
1286 游戏 工程师 Done.
1313 实习生 佛山 Done.
1314 实习生 广州 Done.
1311 生 北京 Done.
1318 深圳 实习生 Done.
1317 护士 Done.
1312 北京 生 Done.
1319 电子商务 深圳 Done.
1320 深圳 电子商务 Done.
1323 低碳 Done.
1325 haha Done.
1324 新能源 Done.
1321 网络营销 深圳 Done.
1309 环境 Done.
1316 京东 Done.
1315 派代 Done.
1330 上海 公关 Done.
1328 广州兼职 Done.
1329 浏览器 Done.
1326 互联网 产品 经理 Done.
1332 新浪 微博 博 Done.
1322 CDM Done.
1331 新浪 微博 Done.
1327 摄影师 Done.
1335 c# 苏州 Done.
1338 123 Done.
1339 研究所 Done.
1337 c# 苏 州 Done.
1333 学徒 Done.
1336 播音 Done.
1340 新加坡 Done.
1344 rhce Done.
1345 OCP Done.
1342 农民 Done.
1346 济南 操作工 Done.
1347 操作工 山东 Done.
1341 劳务 Done.
1348 山东 操作工 Done.
1343 操作工 Done.
1351 产品经历 Done.
1352 csico Done.
1353 江门 Done.
1349 商河 Done.
1350 生产副总 Done.
1356 奕惠嘉 Done.
1359 2131 Done.
1357 暑期工 Done.
1358 页面重构 Done.
1355 希捷 Done.
1361 冶金 Done.
1360 微薄 Done.
1364 游戏 媒介 经理 Done.
1363 CEO Done.
1362 程序 Done.
1365 英语翻译 Done.
1366 网页美工 Done.
1371 baidu Done.
1370 珍爱网 Done.
1367 重构 Done.
1372 商业地产 Done.
1354 Java Senior Software Engineer 软件 工程师 Done.
1374 java 北京 Done.
1334 服务器 Done.
1369 百合网 Done.
1368 世纪佳缘 Done.
1378 大熊 Done.
1373 社交 Done.
1379 eclipse Done.
1381 广州 实习生 Done.
1383 沈阳 韩语 翻译 Done.
1382 木兰设计 Done.
1380 客户服务 Done.
1384 沈阳翻译 Done.
1385 周熙 Done.
1377 深圳 互联网 Done.
1389 制片人 Done.
1387 数字图像 Done.
1388 图像 Done.
1390 识别 Done.
1391 建筑动画 Done.
1386 照片 Done.
1392 相机 Done.
1395 设计学徒 Done.
1393 执行主编 Done.
1396 CAD Done.
1399 电厂 Done.
1394 sarft net Done.
1398 医学 Done.
1401 垃圾 Done.
1402 神经病 Done.
1400 工资 Done.
1376 安全工程 Done.
1375 空调 Done.
1397 力推 上海 淮海 新日铁 招 JAVA 日语 要 学校 211 Done.
1406 蛋白质 Done.
1405 发酵 Done.
1410 律师 南宁 Done.
1412 临沂 Done.
1403 好玩 Done.
1408 广州实习 Done.
1404 纯化 Done.
1411 婚纱 Done.
1409 安全测试 Done.
1415 上海 美术 Done.
1417 交互 深圳 Done.
1413 soho Done.
1418 礼宾员 Done.
1407 游戏开发 Done.
1414 视觉 Done.
1419 talend Done.
1423 郑州 法语 Done.
1422 美团 Done.
1424 郑州 英语 Done.
1425 郑州 外语 Done.
1420 网站设计 Done.
1427 jobkoo Done.
1426 sales Done.
1429 媒介 北京 Done.
1416 产品策划 Done.
1432 sharepoint Done.
1434 fles Done.
1431 moss Done.
1433 开心 Done.
1435 汽修 Done.
1437 c/c Done.
1440 上海 oracle Done.
1438 新疆 Done.
1439 北京 产品 Done.
1430 媒介执行 Done.
1441 net 软件 工程师 Done.
1442 深圳 net 软件 工程师 Done.
1443 qqqqr Done.
1436 猎头职位 Done.
1446 北京保安 Done.
1428 媒介 Done.
1445 视觉设计 是飞 Done.
1447 php 围绕 Done.
1452 call center Done.
1453 呼叫中心 北京 Done.
1450 net 北京 Done.
1454 建筑 哈尔滨 Done.
1457 郑州 房产 人员 Done.
1451 宝马 Done.
1449 深圳 行政 Done.
1459 电气销售 Done.
1460 宁夏销售 Done.
1461 城市规划 Done.
1444 保安 Done.
1458 房产销售 Done.
1464 杭州 电子商务 产业园 Done.
1462 网络推广 Done.
1463 asp net 程序员 Done.
1448 兼 Done.
1467 虾米网 Done.
1468 CAD 机械 设计师 Done.
1469 CAD 机械 Done.
1466 唯你网 Done.
1470 zhonghuayantu Done.
1473 CAD 员 大学生 Done.
1472 CAD 大学生 Done.
1465 杭州 电子商务 Done.
1455 cate 视频 编辑 city 济南 Done.
1478 郑德明 Done.
1479 交互 杭州 Done.
1477 公关策划 Done.
1476 策划经理 Done.
1475 技术 Done.
1481 视觉设计 北京 Done.
1474 行政助理 Done.
1482 网页设计 北京 Done.
1485 珠海司机 Done.
1483 北京 游戏公司 Done.
1488 网络推广 长沙 Done.
1484 网站策划 Done.
1486 司机 Done.
1471 大学生 Done.
1490 samwang jobkoo com Done.
1492 职酷 Done.
1480 电话回访 Done.
1491 jobkoo com Done.
1489 职酷网 Done.
1493 深深深 Done.
1497 国际贸易 上海 Done.
1498 上海 英语翻译 Done.
1499 上海 日语 翻译 Done.
1495 华为 Done.
1501 160 深圳 Done.
1500 上海翻译 Done.
1502 160深圳 Done.
1504 影视 设计类 Done.
1503 数据分析 Done.
1506 北京影视 Done.
1507 快递 Done.
1496 国际贸易 Done.
1494 北京 大麦 网 前端 工程师 Done.
1487 网络编辑 Done.
1510 马鞍山 Done.
1511 保时捷 Done.
1512 杭州 园林 Done.
1508 charming lu sina cn Done.
1509 交互 新蛋 Done.
1505 影视 Done.
1518 897720084 Done.
1517 交互 实习生 Done.
1516 网页 设计师 北京 Done.
1515 北京 seo Done.
1520 嘉定 Done.
1522 wangjiayun11 Done.
1521 深圳 包装设计 Done.
1513 团购 Done.
1525 1122 Done.
1524 厦门、 Done.
1527 景德镇 Done.
1526 asp net Done.
1514 city 重庆 文案 助理 要求 英语 专业 Done.
1528 农药 Done.
1519 摄影助理 Done.
1530 上海 宝 Done.
1529 result Done.
1531 新蛋 Done.
1532 java 广州 Done.
1535 fdsafdsa Done.
1534 成都 java 架构 师 Done.
1536 地产中介 Done.
1533 中文 Done.
1523 前端 工程师 Done.
1538 杭州 虾米 Done.
1539 北京百度 Done.
1542 北京 豆瓣 Done.
1541 上海 pplive Done.
1543 广州 网页设计 Done.
1545 dsfasdf Done.
1540 北京 百度 Done.
1546 outlook Done.
1548 vba Done.
1544 东北 Done.
1547 网页设计 深圳 Done.
1550 海归 Done.
1549 河北 Done.
1552 江苏 Done.
1554 广州 新浪 微博 Done.
1555 南京 实习生 Done.
1537 地产 Done.
1556 动漫助理 Done.
1553 江明炜 Done.
1557 seo 推文 Done.
1558 帝网 络 Done.
1561 1 Done.
1559 ss Done.
1560 22 3 Done.
1562 12 Done.
1565 童装 设计师 Done.
1566 上海 产品 经理 Done.
1568 网络 编辑 Done.
1563 3 Done.
1564 服装 设计师 Done.
1572 合肥 Done.
1570 行政 Done.
1551 国外 Done.
1569 招聘专员 Done.
1567 美术编辑 Done.
1571 产品 经理 无线 Done.
1456 南京 天 天加 加 空调设备 有限公司 硬件 工程师 人 商用机 产品 等等 详情 请 http www ntjob 88 com vvip cm 1294213192877 更多 信息 暖通 英才 网 Done.
1576 设计 北京 Done.
1580 阿里 Done.
1577 银时代 Done.
1579 将爱 Done.
1578 传统文化 网络 编辑 Done.
1573 方正 Done.
1575 测试 工程师 Done.
1582 金鹰 Done.
1584 销售助理 Done.
1583 天翼 Done.
1586 上海策划 Done.
1585 上海企划 Done.
1581 beij Done.
1574 运维 维 工程师 Done.
1588 广州 外贸 跟 单员 Done.
1589 广州 跟 单员 Done.
1591 重庆 网站 编辑 Done.
1594 快消品 Done.
1592 搜狐微博 Done.
1587 广州 外贸 Done.
1598 实习 天津 Done.
1597 广州 PHP Done.
1593 n8 Done.
1600 长沙 net Done.
1599 求职 实习生 Done.
1602 实习生 天津 Done.
1604 安智网 Done.
1601 实习生 招聘 Done.
1595 net 工程师 Done.
1605 贾琪 Done.
1606 诺亚 Done.
1603 北京 金融 Done.
1607 研华 Done.
1608 制药 Done.
1590 电影剪辑 Done.
1610 实习 金融 专业 Done.
1596 39健康 Done.
1614 asp Done.
1613 nihao Done.
1615 聚能灶 Done.
1616 groupon hr sina com Done.
1609 昆明 Done.
1620 procurement Done.
1621 广州 服务员 Done.
1617 ljb 115 com Done.
1619 汽车之家 Done.
1624 杭州 赛博 创业 工场 Done.
1612 企划 Done.
1618 开发 Done.
1611 杭州 招聘 产品设计 人员 Done.
1626 杭州 创业 Done.
1628 豆瓣招聘 Done.
1630 xiaolinzou Done.
1622 网页 Done.
1631 网络 编辑 重庆 Done.
1623 研发 Done.
1632 重庆 网站 设计师 Done.
1633 重庆 网页 设计师 Done.
1625 赛博 创业 工场 Done.
1636 重庆 文案 策划 Done.
1635 重庆 产品 设计师 Done.
1627 香港 Done.
1638 通訊 Done.
1629 caoyang corp the 9 com Done.
1637 engineer Done.
1640 通信维护 Done.
1643 校园能人 Done.
1644 阜阳 师范学院 Done.
1639 光缆维护 Done.
1645 阜师院 Done.
1641 通信 Done.
1642 通信技术 Done.
1634 重庆 设计师 Done.
1647 交互 设计 实习生 Done.
1648 广州招聘 Done.
1649 用户 研究员 Done.
1653 北京 平面设计 Done.
1652 北京 求职 平面设计 Done.
1651 摄影招聘 Done.
1655 厦门司机 Done.
1657 律师助理 Done.
1658 奢侈品 Done.
1659 GUCCI Done.
1656 店长 Done.
1661 安全管理 Done.
1660 LV Done.
1663 新浪体育 Done.
1666 北京 减排 Done.
1664 zhangjing Done.
1665 深圳 运营 Done.
1662 张玉铭 Done.
1667 项目 经理 北京 Done.
1669 广州 编辑 Done.
1671 ui 设计 杭州 Done.
1672 大麦 Done.
1673 大麦 上海 Done.
1670 华为 孙亚芳 Done.
1668 诺基亚 Done.
1674 UED 经理 上海 Done.
1676 upipi pi Done.
1677 厦门兼职 Done.
1680 测试研发 Done.
1678 证券分析 Done.
1675 记者 编辑 Done.
1679 人力资源 总监 Done.
1682 郑州 实习生 Done.
1681 火花网 Done.
1683 郑州 java Done.
1685 质控 Done.
1654 系统 Done.
1687 内容 管理系统 Done.
1689 深圳 自动化 Done.
1688 广东招聘 Done.
1684 QC Done.
1686 液相 Done.
1646 维修电工 Done.
1693 兼职运营 Done.
1692 侯子爱 吃 桃子 Done.
1691 手机游戏 Done.
1694 软件开发 工程师 Done.
1699 架构 师 上海 Done.
1690 陈列 Done.
1696 手工 Done.
1697 生活馆 Done.
1700 软件 架构 师 北京 Done.
1701 云吞 Done.
1702 13916086091 Done.
1695 产品 实习 Done.
1698 软件 架构 师 Done.
1704 杭州 动漫 Done.
1706 理想 哥 产品 经理 Done.
1703 阳江 Done.
1708 中国 国际 动漫 节 Done.
1709 动漫节 Done.
1705 北京 动漫 Done.
1707 项目 经理 Done.
1712 货代 Done.
1714 郑州 外贸 跟 单员 Done.
1715 浙江 Done.
1716 策划 北京 Done.
1713 外贸 跟 单员 Done.
1710 佛山 Done.
1720 产品 经理 手机 Done.
1717 淘宝房产 Done.
1721 binarylee Done.
1719 树苗 Done.
1711 日语 Done.
1725 舞蹈招聘 Done.
1723 生 广州 Done.
1726 界面外包 Done.
1724 舞蹈 Done.
1727 界面 外包 Done.
1718 树 Done.
1722 无线 产品 经理 北京 Done.
1728 UI 外包 Done.
1731 深圳 产品 经历 Done.
1729 深圳 产品 设计师 Done.
1732 深圳 产品 经理 Done.
1730 深圳 产品 Done.
1733 交互 实习 北京 Done.
1734 实习 交互 北京 Done.
1737 faxtee Done.
1736 创业 北京 Done.
1740 联系售后 Done.
1738 成都 市场 Done.
1742 联想电脑 Done.
1741 联系 售后服务 Done.
1739 cic Done.
1746 深圳 设计 Done.
1743 毕业生 Done.
1745 测试经理 Done.
1748 测试 工程师 上海 Done.
1744 guoli1 Done.
1749 三五互联 Done.
1750 沈阳 机械 Done.
1747 兰亭集势 Done.
1751 求职 ios Done.
1753 深圳 管理咨询 Done.
1754 hr duohuwai com Done.
1756 农商 Done.
1755 宝宝教育 Done.
1752 市场总监 Done.
1760 化学 Done.
1758 材化 Done.
1759 材化 Done.
1763 全段 Done.
1761 mysql DBA Done.
1764 兼职客服 Done.
1757 材料 Done.
1765 珠海招聘 Done.
1766 成都 ui Done.
1767 建筑设计 Done.
1771 助理 天津 Done.
1770 遥感 Done.
1769 当当 Done.
1768 建筑 设计 Done.
1735 项目管理 Done.
1772 助理 北京 Done.
1773 招 实习 广州 Done.
1774 北京 移动 互联网 Done.
1777 招实习 广州 Done.
1776 idg Done.
1781 郑州 实习 Done.
1775 深圳 android Done.
1780 酷狗 Done.
1782 后期 Done.
1783 lingxue 1985 h Done.
1785 guangz Done.
1778 生 天津 Done.
1779 服务端 Done.
1786 asp net 成都 Done.
1788 aasdf Done.
1787 ffff Done.
1790 再发 发 围脖 征募 Done.
1792 瓦力 Done.
1793 DKM Done.
1794 武汉 java Done.
1789 MM Done.
1791 求职信息 Done.
1795 产品实习 Done.
1797 renderman Done.
1798 php 方面 职位 Done.
1796 天 Done.
1799 北京 交互 设计 Done.
1801 大专 学历 女孩子 做 Done.
1800 交互 设计 北京 Done.
1804 24券团购 Done.
1802 Goso Done.
1805 24券 Done.
1803 融众网 Done.
1807 前台 北京 Done.
1810 视觉设计 阿里 Done.
1808 市场 运营 助理 Done.
1809 深圳 网页 设计师 Done.
1811 销售 深圳 Done.
1812 深圳 销售 Done.
1813 太原 编辑 Done.
1762 实习生 北京 交互 设计 Done.
1784 lingxue 1985 hotmail com Done.
1806 网站技术 经理 Done.
1818 厦门 平面 Done.
1816 爱库 Done.
1820 厦门 实习 Done.
1814 杂志 编辑 Done.
1821 鄂尔多斯 Done.
1819 文字录入 Done.
1815 音乐 编辑 Done.
1817 厦门 ui Done.
1822 建筑工程 设计 Done.
1829 中演 票务 通 Done.
1827 广东汕头 Done.
1830 凯业必达 Done.
1831 GUI 设计师 Done.
1823 建筑工程 技术 Done.
1832 呼叫中心 运营 经理 Done.
1833 康琴伢 Done.
1834 13657439572 Done.
1825 数值策划 Done.
1828 化妆师 Done.
1835 产品 北京 Done.
1826 凡客 Done.
1840 新浪 商务 拓展 Done.
1839 上海兼职 Done.
1838 上海 兼职 Done.
1824 杭州 实习 Done.
1842 新浪 前端 Done.
1845 美会 Done.
1844 亿贝 Done.
1841 山东 前端 Done.
1843 ebay Done.
1836 产品 经理 无限 Done.
1837 20万 Done.
1850 风险投资 Done.
1852 麦包包 Done.
1851 风投 Done.
1849 associate Done.
1848 investment Done.
1853 用友 商务 Done.
1856 编辑 郑州 Done.
1858 网易 含 资格 Done.
1857 上海 支付 宝 Done.
1855 俄语翻译 Done.
1859 网易杭州 Done.
1860 西宁 Done.
1862 杭州 音乐 Done.
1861 用友北京 Done.
1854 北京招聘 Done.
1846 惠普 Done.
1863 音乐 杭州 Done.
1866 青岛 交互 设计 Done.
1867 大连 前端 Done.
1865 13326657232 Done.
1864 丁允 Done.
1871 运城 Done.
1869 长沙 java Done.
1872 北京 销售 Done.
1875 1985 Done.
1876 杭州 法律 Done.
1873 android 上海 Done.
1874 drupal Done.
1877 杭州 法学 Done.
1870 统计分析 Done.
1878 天津滨海 Done.
1868 市场 北京 Done.
1882 广州 客户端 Done.
1879 asdfasdfasd Done.
1886 微盘 Done.
1883 社区 运营 Done.
1884 游戏测试 Done.
1881 客户端 Done.
1885 数据库 工程师 Done.
1880 数据库 开发 工程师 Done.
1888 成都 经营 Done.
1889 成都 运营 Done.
1892 成都 经理 Done.
1891 成都 经理 Done.
1893 成都 产品 Done.
1896 厦门 界面 Done.
1895 汽车 南京 Done.
1894 汽车 检测员 Done.
1890 成都 经理 Done.
1898 超经 Done.
1897 建筑 工程师 Done.
1899 经纪人 Done.
1847 万 Done.
1900 北京 网页 设计师 Done.
1903 seo 工程师 Done.
1905 ls Done.
1904 产品 总监 北京 Done.
1902 市场北京 Done.
1906 环艺 Done.
1887 罗兰 科技发展 有限公司 Done.
1907 重庆销售 Done.
1910 广州 投资 经理 Done.
1901 用户 Done.
1912 中文分词 Done.
1911 产品 经理 广州 Done.
1908 led Done.
1909 杭州 php Done.
1916 @小马拓 Done.
1913 广州 互动 Done.
1915 交互 设计 上海 Done.
1919 北京 平面设计 实习生 Done.
1914 设计经理 Done.
1918 平面设计 实习生 Done.
1921 徐小平 Done.
1917 上 Done.
1922 盛大 Done.
1924 运维 维 工程师 sina Done.
1925 sina Done.
1927 产品设计 实习 Done.
1928 bet Done.
1929 BJBET CN Done.
1931 玉林 Done.
1930 android java Done.
1934 产品 经理 深圳 Done.
1935 lvyulin 20082163 com Done.
1933 java python Done.
1932 兼职 北京 Done.
1936 lvyulin 2008 163 com Done.
1938 加盟招商 Done.
1926 king Done.
1939 ux Done.
1940 系统开发 Done.
1941 有奖 Done.
1937 拓展 Done.
1920 city 北京 cate 程序员 Done.
1923 平面 Done.
1946 ggggggggggaaaaa Done.
1943 伯乐奖 Done.
1944 php 厦门 Done.
1951 goldengate Done.
1950 安徽 司机 Done.
1949 幕墙 销售 经理 职位 Done.
1952 容灾 Done.
1953 灾备 Done.
1945 工商 Done.
1948 总经理 Done.
1955 uspv Done.
1954 hds Done.
1957 易到用车 Done.
1956 网页 设计师 兼职 Done.
1958 BD 广州 Done.
1947 上海 生 Done.
1942 伯乐 Done.
"""
b=a.split('\n')
e=[]
for c in b:
d=" ".join(c.split()[:-1])
e+=[d]
g="\r\n".join(e).encode('utf-8')
f = open("tbole.txt", "w")
f.write(g)
f.close()
print "Wrote results."
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/chuli.py | Python | gpl3 | 45,346 |
#!/usr/bin/env python
#coding=utf-8
catelist = [
(1, u"传统网络Internet"),
(2, u"移动互联"),
(3, u"网游"),
(4, u"电子商务_B2C/团购"),
(5, u"软件、电信"),
(6, u"新媒体"),
(7, u"风投/投行"),
(8, u"其他外企"),
]
idlist = [
[1, (u"超超Sandy", "d11c25990634d0e486235f1b42a55f9f", "89859ba49065135017b894df5e5a9089")],
[1, (u"传统网络2", "9257d982dcbc26d21fa4f0afb16a54be", "e99c1ae713e14edc3ec3abb7e2344be3")],
[2, (u"冬冬Billy", "f6449dd703d66cf2be5274f321416958", "31c47db4cd79e43a9196871a554d0847")],
[2, (u"新潮-独", "e17cec5e79cd81704aa4b73d15caf639", "983582e2b4b880cc35caa7ac38ce3449")],
[2, (u"移动互联2", "6193a010668f5dcc106e671babf4fbe1", "605e4449590b2c3d96d34b049f96fdbd")],
[3, (u"田田July", "032ec596fa363aa9bd3e5e5917f6aea4", "9e0c243fa3ff3515765510ba4010c411")],
[3, (u"网游2", "743700d7ec385d0b740ecc9a4ef519d4", "b89c6d406e235ab3c49ccea1d82b5622")],
[4, (u"田田Lily", "3ef7fc951a66918dd1cd722485fe1686", "74f524fe376ce995703e73e63407684f")],
[4, (u"电子商务临2", "669001d16b1641a2138d529b435eaefb", "13f58a73995fd2b80bc0aa875ad363f0")],
[5, (u"小朱Linda", "0c10534f393fe08451edb140e3b1150d", "423fd333a2542dbf6e2a38119a6e7e04")],
[5, (u"软件电信2", "f577ad7699dc1a74330bc41329c2ce71", "20cc173dbb46a6784588767e71de03ef")],
[6, (u"小王trueman", "1f8f7db82cdbc346a91840cef2bc1cb9", "a16ead9ee3b6b3f43e601de127275ddc")],
[6, (u"新媒体2", "fc565ccfa32bdb962becc8d49a5a37d3", "8504469c6cad83cde0998299aca8b2fa")],
[7, (u"小毕Simon", "4151efe34301f5fddb9d34fc72e5f4a4", "dc4a07e8b7936d688726604a7442e4bc")],
[7, (u"风投2", "b14cbaaae5e46079770ea77feeaa0c91", "2dd7a1e5bb6036d69b2c983aa3f2a682")],
[8, (u"小黄Lily", "8ee871ac7d18e0141b54077fefd58af6", "dc5cda5a9a4ab5c5a5cd53f85f1f7915")],
[8, (u"外企名企2", "6712203ce54da88930f72014a0ef90bd", "d97779c02d60cacbabd0c398cb8acd93")],
]
| 0f523140-f3b3-4653-89b0-eb08c39940ad | trunk/src/crawler/crawler_id.py | Python | gpl3 | 2,109 |
/*##########*/
/*RIBBON STYLE MENU*/
/*##########*/
.menuIcons {
width: 550px;
background: whitesmoke;
outline: 1px solid #013d98;
}
.iconTabs {
position: absolute !important;
top: 0 !important;
left: 0px !important;
right: 0px !important;
border: none !important;
}
.menuPin {
cursor: pointer;
display: inline-block;
float: right;
margin-top: 7px;
padding: 2px;
margin-right: 5px;
background: #4D749E;
border-radius: 2px;
}
.menuPin:hover {
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
/* IE10 Consumer Preview */
background-image: -ms-linear-gradient(top, #EDF4FF -20%, #1D68B3 100%);
/* Mozilla Firefox */
background-image: -moz-linear-gradient(top, #EDF4FF -20%, #1D68B3 100%);
/* Opera */
background-image: -o-linear-gradient(top, #EDF4FF -20%, #1D68B3 100%);
/* Webkit (Safari/Chrome 10) */
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #EDF4FF), color-stop(1, #1D68B3));
/* Webkit (Chrome 11+) */
background-image: -webkit-linear-gradient(top, #EDF4FF 0%, #1D68B3 100%);
/* W3C Markup, IE10 Release Preview */
background-image: linear-gradient(to bottom, #EDF4FF -20%, #4D749E 100%);
box-shadow: 0 0 0 1px #1D68B3;
}
#headerDiv .ui-tabs .ui-tabs-panel {
padding: 0 !important;
}
/*MENU TABS*/
.iconTabs {
padding: 0 !important;
margin: 0 !important;
}
.iconTabs > ul li:not(:first-child) {
margin-top: 15px;
}
.iconTabs > ul {
border: none;
padding: 0 !important;
margin: 0 !important;
}
.iconTabs > ul > li:hover:not(:first-child) > a {
/* IE10 Consumer Preview */
background-image: -ms-linear-gradient(top, #EDF4FF -20%, #4D749E 100%);
/* Mozilla Firefox */
background-image: -moz-linear-gradient(top, #EDF4FF -20%, #4D749E 100%);
/* Opera */
background-image: -o-linear-gradient(top, #EDF4FF -20%, #4D749E 100%);
/* Webkit (Safari/Chrome 10) */
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #EDF4FF), color-stop(1, #4D749E));
/* Webkit (Chrome 11+) */
background-image: -webkit-linear-gradient(top, #EDF4FF 0%, #4D749E 100%);
/* W3C Markup, IE10 Release Preview */
background-image: linear-gradient(to bottom, #EDF4FF -20%, #4D749E 100%);
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
color: whitesmoke !important;
}
.iconTabs > ul > li:not(:first-child) {
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
color: whitesmoke !important;
}
.menuContent, .menuIcons {
width: 100%;
background: whitesmoke;
}
.iconTabs > ul > .ui-state-active {
background: whitesmoke;
}
.iconTabs > ul > li.ui-tabs-active:hover > a {
background-image: none !important;
color: #555 !important;
}
#headerDiv > div > ul {
/* IE10 Consumer Preview */
background-image: -ms-linear-gradient(left, #CCCCCC 0%, #013D98 100%);
/* Mozilla Firefox */
background-image: -moz-linear-gradient(left, #CCCCCC 0%, #013D98 100%);
/* Opera */
background-image: -o-linear-gradient(left, #CCCCCC 0%, #013D98 100%);
/* Webkit (Safari/Chrome 10) */
background-image: -webkit-gradient(linear, left top, right top, color-stop(0, #CCCCCC), color-stop(1, #013D98));
/* Webkit (Chrome 11+) */
background-image: -webkit-linear-gradient(left, #CCCCCC 0%, #013D98 100%);
/* W3C Markup, IE10 Release Preview */
background-image: linear-gradient(to right, #CCCCCC 0%, #013D98 100%);
}
.iconTabs > ul > li.ui-state-default {
/* Note: This gradient may render differently in browsers that don't support the unprefixed gradient syntax */
/* IE10 Consumer Preview */
background-image: -ms-linear-gradient(bottom left, #F2F2F2 0%, #999999 100%);
/* Mozilla Firefox */
background-image: -moz-linear-gradient(bottom left, #F2F2F2 0%, #999999 100%);
/* Opera */
background-image: -o-linear-gradient(bottom left, #F2F2F2 0%, #999999 100%);
/* Webkit (Safari/Chrome 10) */
background-image: -webkit-gradient(linear, left bottom, right top, color-stop(0, #F2F2F2), color-stop(1, #999999));
/* Webkit (Chrome 11+) */
background-image: -webkit-linear-gradient(bottom left, #F2F2F2 0%, #999999 100%);
/* W3C Markup, IE10 Release Preview */
background-image: linear-gradient(to top, #F2F2F2 10%, #999999 300%);
}
.menuIcons {
/* IE10 Consumer Preview */
background-image: -ms-linear-gradient(top, #F2F2F2 0%, #999999 100%);
/* Mozilla Firefox */
background-image: -moz-linear-gradient(top, #F2F2F2 0%, #999999 100%);
/* Opera */
background-image: -o-linear-gradient(top, #F2F2F2 0%, #999999 100%);
/* Webkit (Safari/Chrome 10) */
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #F2F2F2), color-stop(1, #999999));
/* Webkit (Chrome 11+) */
background-image: -webkit-linear-gradient(top, #F2F2F2 0%, #999999 100%);
/* W3C Markup, IE10 Release Preview */
background-image: linear-gradient(to bottom, #F2F2F2 0%, #999999 200%);
}
li.ui-tabs-active {
border-color: #013d98 !important;
}
/*bleeding the background gradient*/
#headerDiv, #headerDiv > div:not(.menuPin), #headerDiv > div > ul {
background:none !important;
}
.ui-layout-north {
/*background-image: linear-gradient(to right, #CCCCCC 0%, #013D98 100%) !important;*/
/* IE10 Consumer Preview */
background-image: -ms-linear-gradient(right, #CCCCCC 0%, #285CAA 100%);
/* Mozilla Firefox */
background-image: -moz-linear-gradient(right, #CCCCCC 0%, #285CAA 100%);
/* Opera */
background-image: -o-linear-gradient(right, #CCCCCC 0%, #285CAA 100%);
/* Webkit (Safari/Chrome 10) */
background-image: -webkit-gradient(linear, right top, left top, color-stop(0, #CCCCCC), color-stop(1, #285CAA));
/* Webkit (Chrome 11+) */
background-image: -webkit-linear-gradient(right, #CCCCCC 0%, #285CAA 100%);
/* W3C Markup, IE10 Release Preview */
background-image: linear-gradient(to left, #CCCCCC 0%, #285CAA 100%);
}
/*##########*/
/*MENU ICONS*/
/*##########*/
.menuIcons {
width: 100%;
outline: 1px solid #013d98;
}
.iconWrap {
margin: 2px;
padding: 2px;
cursor: pointer;
}
.iconWrap:hover {
border-radius: 3px;
box-shadow: 0 0 0 1px #1D68B3;
/* IE10 Consumer Preview */
background-image: -ms-linear-gradient(top, #EDF4FF 0%, #4D749E 100%);
/* Mozilla Firefox */
background-image: -moz-linear-gradient(top, #EDF4FF 0%, #4D749E 100%);
/* Opera */
background-image: -o-linear-gradient(top, #EDF4FF 0%, #4D749E 100%);
/* Webkit (Safari/Chrome 10) */
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #EDF4FF), color-stop(1, #4D749E));
/* Webkit (Chrome 11+) */
background-image: -webkit-linear-gradient(top, #EDF4FF 0%, #4D749E 100%);
/* W3C Markup, IE10 Release Preview */
background-image: linear-gradient(to bottom, #EDF4FF 0%, #4D749E 100%);
}
.iconWrap:hover div {
/*color:#1D68B3;*/
color: whitesmoke;
}
.iconWrap, .iconGroup {
display: inline-block !important;
}
.iconWrap img {
width: 32px;
height: 32px;
}
.iconWrap img, .iconWrap div {
display: block;
margin-left: auto;
margin-right: auto;
text-align: center;
color: #05274D;
}
.iconGroup {
border-right: 2px solid #B9C2DA;
padding: 2px;
margin: 2px;
}
.iconWrap div, .menuPin, .menuPin:hover {
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.iconDisable, .iconDisable:hover, .iconDisable:hover > div{
cursor: default;
background:none;
background-image:none;
outline:none;
border:none;
box-shadow:none;
color:#05274D;
}
.iconWrap.about {
padding-left: 12px;
padding-right: 12px;
}
/*###########*/
/*10ZIG LOGO TOP RIGHT HEADER*/
/*###########*/
#headerDiv > img {
position: absolute;
right: 15px;
top: 1px;
height: 40px;
} | 10zig | trunk/test/menuStyleSheet.css | CSS | art | 8,837 |
@import url('../slick-default-theme.css');
* {
font-family: arial;
font-size: 9pt;
}
#myGrid {
background: white;
outline: 0;
border: 1px solid gray;
}
.grid-header {
border: 1px solid gray;
border-bottom: 0;
border-top: 0;
background: url('../images/header-bg.gif') repeat-x center top;
color: black;
height: 24px;
line-height: 24px;
}
.grid-header label {
display: inline-block;
font-weight: bold;
margin: auto auto auto 6px;
}
.grid-header .ui-icon {
margin: 4px 4px auto 6px;
background-color: transparent;
border-color: transparent;
}
.grid-header .ui-icon.ui-state-hover {
background-color: white;
}
.grid-header #txtSearch {
margin: 0 4px 0 4px;
padding: 2px 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border: 1px solid silver;
}
.options-panel {
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border: 1px solid silver;
background: #f0f0f0;
padding: 4px;
margin-bottom: 20px;
width: 320px;
position: absolute;
top: 0px;
left: 650px;
}
/* Individual cell styles */
.slick-cell.task-name {
font-weight: bold;
text-align: right;
}
.slick-cell.task-percent {
text-align: right;
}
.slick-cell.cell-move-handle {
font-weight: bold;
text-align: right;
border-right: solid gray;
background: #efefef;
cursor: move;
}
.cell-move-handle:hover {
background: #b6b9bd;
}
.slick-row.selected .cell-move-handle {
background: #D5DC8D;
}
.slick-row .cell-actions {
text-align: left;
}
.slick-row.complete {
background-color: #DFD;
color: #555;
}
.percent-complete-bar {
display: inline-block;
height: 6px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
/* Slick.Editors.Text, Slick.Editors.Date */
input.editor-text {
width: 100%;
height: 100%;
border: 0;
margin: 0;
background: transparent;
outline: 0;
padding: 0;
}
.ui-datepicker-trigger {
margin-top: 2px;
padding: 0;
vertical-align: top;
}
/* Slick.Editors.PercentComplete */
input.editor-percentcomplete {
width: 100%;
height: 100%;
border: 0;
margin: 0;
background: transparent;
outline: 0;
padding: 0;
float: left;
}
.editor-percentcomplete-picker {
position: relative;
display: inline-block;
width: 16px;
height: 100%;
background: url("../images/pencil.gif") no-repeat center center;
overflow: visible;
z-index: 1000;
float: right;
}
.editor-percentcomplete-helper {
border: 0 solid gray;
position: absolute;
top: -2px;
left: -9px;
background: url("../images/editor-helper-bg.gif") no-repeat top left;
padding-left: 9px;
width: 120px;
height: 140px;
display: none;
overflow: visible;
}
.editor-percentcomplete-wrapper {
background: beige;
padding: 20px 8px;
width: 100%;
height: 98px;
border: 1px solid gray;
border-left: 0;
}
.editor-percentcomplete-buttons {
float: right;
}
.editor-percentcomplete-buttons button {
width: 80px;
}
.editor-percentcomplete-slider {
float: left;
}
.editor-percentcomplete-picker:hover .editor-percentcomplete-helper {
display: block;
}
.editor-percentcomplete-helper:hover {
display: block;
}
/* Slick.Editors.YesNoSelect */
select.editor-yesno {
width: 100%;
margin: 0;
vertical-align: middle;
}
/* Slick.Editors.Checkbox */
input.editor-checkbox {
margin: 0;
height: 100%;
padding: 0;
border: 0;
}
| 10zig | trunk/test/base.css | CSS | art | 3,356 |
html {
background-color: #e2e2e2;
margin: 0;
padding: 0;
}
body {
background-color: #fff;
border-top: solid 10px #000;
color: #333;
font-size: .85em;
font-family: "Segoe UI", Verdana, Helvetica, Sans-Serif;
margin: 0;
padding: 0;
}
a {
color: #333;
outline: none;
padding-left: 3px;
padding-right: 3px;
text-decoration: underline;
}
a:link, a:visited,
a:active, a:hover {
color: #333;
}
a:hover {
background-color: #c7d1d6;
}
header, footer, hgroup,
nav, section {
display: block;
}
mark {
background-color: #a6dbed;
padding-left: 5px;
padding-right: 5px;
}
.float-left {
float: left;
}
.float-right {
float: right;
}
.clear-fix:after {
content: ".";
clear: both;
display: block;
height: 0;
visibility: hidden;
}
h1, h2, h3,
h4, h5, h6 {
color: #000;
margin-bottom: 0;
padding-bottom: 0;
}
h1 {
font-size: 2em;
}
h2 {
font-size: 1.75em;
}
h3 {
font-size: 1.2em;
}
h4 {
font-size: 1.1em;
}
h5, h6 {
font-size: 1em;
}
h5 a:link, h5 a:visited, h5 a:active {
padding: 0;
text-decoration: none;
}
/* main layout
----------------------------------------------------------*/
.content-wrapper {
margin: 0 auto;
max-width: 960px;
}
#body {
background-color: #efeeef;
clear: both;
padding-bottom: 35px;
}
.main-content {
background: url("../Images/accent.png") no-repeat;
padding-left: 10px;
padding-top: 30px;
}
.featured + .main-content {
background: url("../Images/heroAccent.png") no-repeat;
}
header .content-wrapper {
padding-top: 20px;
}
footer {
clear: both;
background-color: #e2e2e2;
font-size: .8em;
height: 100px;
}
/* site title
----------------------------------------------------------*/
.site-title {
color: #c8c8c8;
font-family: Rockwell, Consolas, "Courier New", Courier, monospace;
font-size: 2.3em;
margin: 0;
}
.site-title a, .site-title a:hover, .site-title a:active {
background: none;
color: #c8c8c8;
outline: none;
text-decoration: none;
}
/* login
----------------------------------------------------------*/
#login {
display: block;
font-size: .85em;
margin: 0 0 10px;
text-align: right;
}
#login a {
background-color: #d3dce0;
margin-left: 10px;
margin-right: 3px;
padding: 2px 3px;
text-decoration: none;
}
#login a.username {
background: none;
margin: 0;
padding: 0;
text-decoration: underline;
}
#login ul {
margin: 0;
}
#login li {
display: inline;
list-style: none;
}
/* menu
----------------------------------------------------------*/
ul#menu {
font-size: 1.3em;
font-weight: 600;
margin: 0 0 5px;
padding: 0;
text-align: right;
}
ul#menu li {
display: inline;
list-style: none;
padding-left: 15px;
}
ul#menu li a {
background: none;
color: #999;
text-decoration: none;
}
ul#menu li a:hover {
color: #333;
text-decoration: none;
}
/* page elements
----------------------------------------------------------*/
/* featured */
.featured {
background-color: #fff;
}
.featured .content-wrapper {
background-color: #7ac0da;
background-image: -ms-linear-gradient(left, #7ac0da 0%, #a4d4e6 100%);
background-image: -o-linear-gradient(left, #7ac0da 0%, #a4d4e6 100%);
background-image: -webkit-gradient(linear, left top, right top, color-stop(0, #7ac0da), color-stop(1, #a4d4e6));
background-image: -webkit-linear-gradient(left, #7ac0da 0%, #a4d4e6 100%);
background-image: linear-gradient(left, #7ac0da 0%, #a4d4e6 100%);
color: #3e5667;
padding: 20px 40px 30px 40px;
}
.featured hgroup.title h1, .featured hgroup.title h2 {
color: #fff;
}
.featured p {
font-size: 1.1em;
}
/* page titles */
hgroup.title {
margin-bottom: 10px;
}
hgroup.title h1, hgroup.title h2 {
display: inline;
}
hgroup.title h2 {
font-weight: normal;
margin-left: 3px;
}
/* features */
section.feature {
width: 300px;
float: left;
padding: 10px;
}
/* ordered list */
ol.round {
list-style-type: none;
padding-left: 0;
}
ol.round li {
margin: 25px 0;
padding-left: 45px;
}
ol.round li.zero {
background: url("../Images/orderedList0.png") no-repeat;
}
ol.round li.one {
background: url("../Images/orderedList1.png") no-repeat;
}
ol.round li.two {
background: url("../Images/orderedList2.png") no-repeat;
}
ol.round li.three {
background: url("../Images/orderedList3.png") no-repeat;
}
ol.round li.four {
background: url("../Images/orderedList4.png") no-repeat;
}
ol.round li.five {
background: url("../Images/orderedList5.png") no-repeat;
}
ol.round li.six {
background: url("../Images/orderedList6.png") no-repeat;
}
ol.round li.seven {
background: url("../Images/orderedList7.png") no-repeat;
}
ol.round li.eight {
background: url("../Images/orderedList8.png") no-repeat;
}
ol.round li.nine {
background: url("../Images/orderedList9.png") no-repeat;
}
/* content */
article {
float: left;
width: 70%;
}
aside {
float: right;
width: 25%;
}
aside ul {
list-style: none;
padding: 0;
}
aside ul li {
background: url("../Images/bullet.png") no-repeat 0 50%;
padding: 2px 0 2px 20px;
}
.label {
font-weight: 700;
}
/* login page */
#loginForm {
border-right: solid 2px #c8c8c8;
float: left;
width: 55%;
}
#loginForm .validation-error {
display: block;
margin-left: 15px;
}
#loginForm .validation-summary-errors ul {
margin: 0;
padding: 0;
}
#loginForm .validation-summary-errors li {
display: inline;
list-style: none;
margin: 0;
}
#loginForm input {
width: 250px;
}
#loginForm input[type="checkbox"],
#loginForm input[type="submit"],
#loginForm input[type="button"],
#loginForm button {
width: auto;
}
#socialLoginForm {
margin-left: 40px;
float: left;
width: 40%;
}
#socialLoginForm h2 {
margin-bottom: 5px;
}
#socialLoginList button {
margin-bottom: 12px;
}
#logoutForm {
display: inline;
}
/* contact */
.contact h3 {
font-size: 1.2em;
}
.contact p {
margin: 5px 0 0 10px;
}
.contact iframe {
border: 1px solid #333;
margin: 5px 0 0 10px;
}
/* forms */
fieldset {
border: none;
margin: 0;
padding: 0;
}
fieldset legend {
display: none;
}
fieldset ol {
padding: 0;
list-style: none;
}
fieldset ol li {
padding-bottom: 5px;
}
label {
display: block;
font-size: 1.2em;
font-weight: 600;
}
label.checkbox {
display: inline;
}
input, textarea {
border: 1px solid #e2e2e2;
background: #fff;
color: #333;
font-size: 1.2em;
margin: 5px 0 6px 0;
padding: 5px;
width: 300px;
}
textarea {
font-family: inherit;
width: 500px;
}
input:focus, textarea:focus {
/*border: 1px solid #7ac0da;*/
}
input[type="checkbox"] {
background: transparent;
border: inherit;
width: auto;
}
input[type="submit"],
input[type="button"],
button {
background-color: #d3dce0;
border: 1px solid #787878;
cursor: pointer;
font-size: 1.2em;
font-weight: 600;
padding: 7px;
margin-right: 8px;
width: auto;
}
td input[type="submit"],
td input[type="button"],
td button {
font-size: 1em;
padding: 4px;
margin-right: 4px;
}
/* info and errors */
.message-info {
border: 1px solid;
clear: both;
padding: 10px 20px;
}
.message-error {
clear: both;
color: #e80c4d;
font-size: 1.1em;
font-weight: bold;
margin: 20px 0 10px 0;
}
.message-success {
color: #7ac0da;
font-size: 1.3em;
font-weight: bold;
margin: 20px 0 10px 0;
}
.error {
color: #e80c4d;
}
/* styles for validation helpers */
.field-validation-error {
color: #e80c4d;
font-weight: bold;
}
.field-validation-valid {
display: none;
}
input.input-validation-error {
border: 1px solid #e80c4d;
}
input[type="checkbox"].input-validation-error {
border: 0 none;
}
.validation-summary-errors {
color: #e80c4d;
font-weight: bold;
font-size: 1.1em;
}
.validation-summary-valid {
display: none;
}
/* tables
----------------------------------------------------------*/
table {
border-collapse: collapse;
border-spacing: 0;
margin-top: 0.75em;
border: 0 none;
}
th {
font-size: 1.2em;
text-align: left;
border: none 0px;
padding-left: 0;
}
th a {
display: block;
position: relative;
}
th a:link, th a:visited, th a:active, th a:hover {
color: #333;
font-weight: 600;
text-decoration: none;
padding: 0;
}
th a:hover {
color: #000;
}
th.asc a, th.desc a {
margin-right: .75em;
}
th.asc a:after, th.desc a:after {
display: block;
position: absolute;
right: 0em;
top: 0;
font-size: 0.75em;
}
th.asc a:after {
content: '▲';
}
th.desc a:after {
content: '▼';
}
td {
padding: 0.25em 2em 0.25em 0em;
border: 0 none;
}
tr.pager td {
padding: 0 0.25em 0 0;
}
/********************
* Mobile Styles *
********************/
@media only screen and (max-width: 850px) {
/* header
----------------------------------------------------------*/
header .float-left,
header .float-right {
float: none;
}
/* logo */
header .site-title {
margin: 10px;
text-align: center;
}
/* login */
#login {
font-size: .85em;
margin: 0 0 12px;
text-align: center;
}
#login ul {
margin: 5px 0;
padding: 0;
}
#login li {
display: inline;
list-style: none;
margin: 0;
padding: 0;
}
#login a {
background: none;
color: #999;
font-weight: 600;
margin: 2px;
padding: 0;
}
#login a:hover {
color: #333;
}
/* menu */
nav {
margin-bottom: 5px;
}
ul#menu {
margin: 0;
padding: 0;
text-align: center;
}
ul#menu li {
margin: 0;
padding: 0;
}
/* main layout
----------------------------------------------------------*/
.main-content,
.featured + .main-content {
background-position: 10px 0;
}
.content-wrapper {
padding-right: 10px;
padding-left: 10px;
}
.featured .content-wrapper {
padding: 10px;
}
/* page content */
article, aside {
float: none;
width: 100%;
}
/* ordered list */
ol.round {
list-style-type: none;
padding-left: 0;
}
ol.round li {
padding-left: 10px;
margin: 25px 0;
}
ol.round li.zero,
ol.round li.one,
ol.round li.two,
ol.round li.three,
ol.round li.four,
ol.round li.five,
ol.round li.six,
ol.round li.seven,
ol.round li.eight,
ol.round li.nine {
background: none;
}
/* features */
section.feature {
float: none;
padding: 10px;
width: auto;
}
section.feature img {
color: #999;
content: attr(alt);
font-size: 1.5em;
font-weight: 600;
}
/* forms */
input {
width: 90%;
}
/* login page */
#loginForm {
border-right: none;
float: none;
width: auto;
}
#loginForm .validation-error {
display: block;
margin-left: 15px;
}
#socialLoginForm {
margin-left: 0;
float: none;
width: auto;
}
/* footer
----------------------------------------------------------*/
footer .float-left,
footer .float-right {
float: none;
}
footer {
text-align: center;
height: auto;
padding: 10px 0;
}
footer p {
margin: 0;
}
}
| 10zig | trunk/test/Site.css | CSS | art | 13,948 |
/*THIS STYLE SHEET OVERRIDES ANY STYLING RULES FROM OTHER STYLING SHEETS*/
html {
}
body {
background-color: whitesmoke;
}
/*GENERAL ERROR/OK TEXT COLORS*/
.error {
color: red;
}
.ok {
color: green;
}
.loadingIcon {
position: absolute;
top: 0;
left: 2px;
}
h3 {
margin: 2px;
}
/*###########*/
/*UI GENERAL STYLING*/
/*###########*/
/*TOP HEADER*/
.ui-layout-header {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: #f9f9f9;
border-bottom: 1px solid #717171;
/* IE10 Consumer Preview */
background-image: -ms-linear-gradient(top, #FFFFFF 0%, #999999 100%);
/* Mozilla Firefox */
background-image: -moz-linear-gradient(top, #FFFFFF 0%, #999999 100%);
/* Opera */
background-image: -o-linear-gradient(top, #FFFFFF 0%, #999999 100%);
/* Webkit (Safari/Chrome 10) */
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(.0, #FFFFFF), color-stop(1, #999999));
/* Webkit (Chrome 11+) */
background-image: -webkit-linear-gradient(top, #FFFFFF 0%, #999999 100%);
/* W3C Markup, IE10 Release Preview */
background-image: linear-gradient(to bottom, #FFFFFF 0%, #999999 100%);
}
/*UI PANE HEADER*/
.ui-pane-header {
position: absolute;
left: 0;
right: 0;
height: 25px;
background: #4D749E;
color: whitesmoke;
}
/*UI PANE HEADER LABELS*/
.ui-pane-header-label {
width: 100%;
text-align: center;
margin-left: auto;
margin-right: auto;
margin-top: 3px;
color: whitesmoke !important;
}
/*UI PANE HEADER SEARCH WRAPPER*/
.ui-pane-header-search-wrapper {
position: absolute;
right: 2px;
top: 2px;
bottom: 2px;
background: whitesmoke;
}
.ui-pane-header-search-wrapper > a, .ui-pane-header-search-wrapper > input {
display: inline-block;
vertical-align: middle;
background: whitesmoke;
}
.ui-pane-header-search-wrapper > a {
color: #bbb;
font-size: 14px;
padding-left: 4px;
}
/*UI PANE HEADER SEARCH TEXT AND INPUT*/
.ui-pane-header-search-wrapper > div, .ui-pane-header-search-wrapper > input {
display: inline-block;
vertical-align: middle;
margin-top: 3px;
}
/*UI PANE HEADER SEARCH TEXT*/
.ui-pane-header-search-wrapper > div {
}
/*UI HEADER SEARCH INPUT*/
.ui-pane-header-search-wrapper > input {
border: none;
margin-right: 3px;
}
/*UI LAYOUT PANES*/
.ui-layout-west > .ui-layout-center, .ui-layout-west > .ui-layout-south,
.ui-layout-east > .ui-layout-center, .ui-layout-east > .ui-layout-south,
.ui-layout-center > .ui-layout-center, .ui-layout-center > .ui-layout-south > .ui-layout-center {
border: 1px solid #181818;
}
/*UI RESIZER AND TOGGLER*/
.ui-layout-resizer, .ui-layout-toggler {
/*set animation speed of background*/
-webkit-transition: background.4s linear;
-moz-transition: background .4s linear;
-o-transition: background .4s linear;
transition: background .4s linear;
border: background none;
}
/*RESIZING BARS*/
.ui-layout-resizer {
border: none;
background: #012775;
/* Mozilla Firefox */
background-image: -moz-radial-gradient(center, circle farthest-side, #DADADA 0%, #C4C4C4 50%, #999999 100%);
/* Opera */
background-image: -o-radial-gradient(center, circle farthest-side, #DADADA 0%, #C4C4C4 50%, #999999 100%);
/* Webkit (Safari/Chrome 10) */
background-image: -webkit-gradient(radial, center center, 0, center center, 487, color-stop(0, #DADADA), color-stop(0.4, #C4C4C4), color-stop(1, #999999));
/* Webkit (Chrome 11+) */
background-image: -webkit-radial-gradient(center, circle farthest-side, #DADADA 0%, #C4C4C4 50%, #999999 100%);
/* W3C Markup, IE10 Release Preview */
background-image: radial-gradient(circle farthest-side at center, #DADADA 0%, #C4C4C4 50%, #999999 100%);
background-repeat: repeat;
-webkit-background-size: 200% 200%;
-moz-background-size: 200% 200%;
background-size: 200% 200%;
}
.ui-layout-resizer:hover {
background-position: 0 -100%;
}
/*RESIZIING TOGGLER*/
.ui-layout-toggler {
}
.ui-layout-toggler:hover {
background-color: #414042;
}
/*RESIZING SIDE BARS CLOSED ANCHOR TAG ICON*/
.ui-layout-toggler-closed a {
position: absolute;
top: 30%;
width: 16px;
height: 16px;
left: 0;
color: #181818;
}
.ui-layout-toggler > a {
font-size: 16px !important;
}
.ui-layout-toggler-closed:hover > a {
/*change icon color on "button" hover*/
color: #c2c2c2;
}
/*RESIZING SIDE BAR CLOSED EAST (RIGHT SIDE) ANCHOR TAG ICON*/
.ui-layout-toggler-east-closed a {
/*this flips the image horizontally to reuse the same image*/
/*-moz-transform: scaleX(-1);
-webkit-transform: scaleX(-1);
-o-transform: scaleX(-1);
transform: scaleX(-1);
-ms-filter: fliph; /*IE*/
/*filter: fliph; /*IE*/
}
/*RESIZING BARS OPEN*/
.ui-layout-resizer-open {
}
/*RESIZING BARS OPEN ANCHOR TAG ICON*/
.ui-layout-toggler-open a {
display: none;
}
.ui-layout-toggler-open a:hover {
}
/*UI RESIZER SOUTH (HORIZONTAL)*/
.ui-layout-resizer-south {
}
.ui-layout-resizer-south:hover {
background-position: -100% 0;
}
/*WEST LAYOUT / TOGGLE BUTTON*/
.ui-layout-toggler-west-closed {
}
/*ICON STYLING*/
/*ALL ICONS*/
[class^="icon-"], [class*=" icon-"] {
font-size: 22px;
color: #181818;
}
/*UI FOCUS ITEMS*/
.ui-state-focus {
border-color: #013d98 !important;
}
/*UI STYLING DIALOG WINDOW*/
.ui-dialog {
box-shadow: 2px 2px 2px #414042;
padding: 0;
}
.ui-dialog-content {
background: #eeeeee !important;
}
/*UI STYLING DIALOG TITLE*/
.ui-dialog > .ui-dialog-titlebar {
background: #4D749E;
color: whitesmoke;
}
/*UI DIALOG BUTTON PANE*/
.ui-dialog > .ui-dialog-buttonpane {
padding: 0;
margin: 0;
background: #88919c;
}
/*UI DIALOG BUTTONS*/
.ui-button-text-only .ui-button-text {
padding: 0.3em .6em;
}
.ui-dialog-buttonset > button:hover > span {
/*font-weight: 700;*/
color: #013d98;
}
/*DIALOG CLOSE BUTTON HIDE CLASS*/
.no-close .ui-dialog-titlebar-close {
display: none;
}
/*UI DIALOG INPUT*/
input:focus {
outline: 0 none;
}
/*UI DIALOG TABS*/
.ui-tabs-nav > .ui-state-active {
border-color: #6a83a8;
}
#headerDiv .ui-tabs .ui-tabs-nav li.ui-tabs-active {
padding-bottom: 2px;
}
ul.ui-tabs-nav > li > a {
cursor: default !important;
}
.ui-tabs-nav > li.ui-state-focus > a {
border: none;
}
/*UI DIALOG SETTINGS AUTOCOMPLETE DROP DOWN*/
.ui-autocomplete > li > a, .ui-autocomplete > li {
border: none !important;
margin: 0 !important;
}
.ui-autocomplete > li > a.ui-state-focus {
background: rgba(95, 122, 157, 0.30) !important;
color: #013d98;
margin: 0 !important;
}
/*UI DIALOG LINKS HOVER*/
.contextDialog > div.dialogFillTop > a:hover {
color: #013d98;
}
a:focus, .rebootFlush:focus, .rebootDisabled:focus {
border: 1px solid #013d98;
outline: 0 none;
}
button[type=button]:focus, .ui-dialog-titlebar-close {
box-shadow: none;
outline: none;
}
/*SETTINGS WRAPPER*/
.settingsWrapper {
margin: 10px 0 5px 10px;
}
.settingsWrapper > label, .settingsWrapper > span, .settingsWrapper > button, .settingsWrapper > p {
display: inline-block;
vertical-align: middle;
}
.menuSettingsGeneral label {
width:50px;
text-align:center;
}
/*UI DIALOG SPINNER*/
.tcContextDialogSpinner:focus {
border: none;
}
.dialogFillBottom > label, .dialogFillBottom > span, .dialogFillBottom > input {
display: inline-block;
vertical-align: middle;
}
.dialogFillBottom > span {
padding: 2px;
margin-left: 2px;
}
.dialogFillBottom > span > input {
vertical-align: middle;
margin-top: 0;
}
/*UI DIALOG SETTINGS*/
.resetSettingsBtn:hover {
color: #013d98;
}
/*INITIAL HIDE OF SETTIGS DIALOG*/
.mainMenuDialog {
display: none;
padding: 0 !important;
}
.mainMenuSettingsTabs {
border: none;
}
/*AUTO COMPLETE BOX*/
.ui-autocomplete {
position: absolute;
z-index: 101;
}
/*DIALOG SETTINGS FIELDSETS*/
fieldset {
border: 1px solid #013d98;
border-radius: 0px;
}
/*DISCOVERY SLICKGRID*/
.tcDiscoveryIpWrapper {
position: absolute;
left: 10px;
top: 65px;
right: 180px;
bottom: 60px;
border: 1px solid #013d98;
}
/*TCDISCOVERY INFO*/
.tcDiscoveryIpInfoWrap {
position: absolute;
left: 8px;
top: 355px;
right: 178px;
bottom: 10px;
}
.tcDiscoveryIpView {
/*using overrides to prevent bubbling of tcListView class*/
top: 0px !important;
bottom: 0px !important;
left: 0px !important;
right: 0px !important;
}
/*DISCOVERY IP LIST -> SLICKGRID VIEWPORT*/
.tcDiscoverySettingsView > .slick-viewport {
overflow-x: hidden !important;
}
/*DISCOVERY SLICKGRID HEADER*/
.tcDiscoveryIpView > .slick-header {
border: none;
}
/*DISCOVERY SLICKGRID HEADER COLUMNS*/
.tcDiscoveryIpView > .slick-header > .slick-header-columns > .slick-header-column {
border-left: none !important;
}
/*DISCOVERY SLICKGRID CHECKBOXES*/
.tcDiscoveryCheckBox {
vertical-align: middle;
margin: 3px;
}
/*DISCOVERY SLICKGRID IP EDITING FIELDS*/
.ipInputWrapper {
padding: 1px;
padding-bottom: 5px;
}
/*IP INPUT FIELDS*/
input[name="number"] {
width: 25px;
}
/*DISCOVERY ADD IP RANGE BUTTON WRAPPER*/
.addIpRangeWrapper {
position: absolute;
top: 58px;
right: 15px;
}
/*ADD IP BUTTON*/
.addIpButtonWrapper {
margin-top: 4px;
}
.addIpButtonWrapper > button {
margin: 0;
}
/*DISCOVERY IP BUTTONS*/
.discoveryButtonWrapper {
position: absolute;
bottom: 25px;
right: 30px;
}
.discoveryButtonWrapper > button {
display: block;
width: 100%;
margin-top: 10px;
}
/*DIALOG COLLAPSABILE*/
.tcProperties-tcDialog {
display: none;
}
.collapsible-trigger {
height: 20px;
background: #88919c;
border-bottom: 1px solid #181818;
color: whitesmoke;
cursor: pointer;
}
.collapsible-trigger:hover {
color: #013d98;
}
#dialogColl1, #tcInfoColl1 {
border-top: 1px solid #181818;
}
.collapsible-container {
border-left: 15px solid #c5c5c5;
background: whitesmoke;
}
.collapsible-indicator, .collapsible-text {
display: inline-block;
padding: 1px;
}
.collapsible-trigger.collapse-open > .collapsible-indicator:after {
content: attr(Collapsible-open) "\25bc";
color: #181818;
padding-top: 5px;
padding-left: 2px;
font-size: small;
color: whitesmoke;
/*text-shadow: 1px 1px #181818;*/
}
.collapsible-trigger.collapse-close > .collapsible-indicator:after {
content: attr(Collapsible-open) "\25ba";
color: #181818;
padding-top: 5px;
padding-left: 2px;
font-size: small;
color: whitesmoke;
/*text-shadow: 1px 1px #181818;*/
}
.not-selectable-wrapper {
background: whitesmoke;
}
.not-selectable-info, .not-selectable-value {
padding-left: 5px;
padding-right: 5px;
white-space: nowrap;
text-overflow: ellipsis;
border-bottom: 1px solid #181818;
}
.not-selectable-info {
min-width: 145px;
display: table-cell;
}
.not-selectable-value {
display: table-cell;
width: 100%;
}
.not-selectable {
moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-o-user-select: none;
color: rgba(24, 24, 24, .8);
cursor: default;
}
.not-selectable-info > div:not(.ui-resizable-handle) {
border-right: 1px solid #181818;
border-left: 1px solid #181818;
}
.not-selectable-value > div {
border-right: 1px solid #181818;
}
.ui-resizable-helper-tcprop {
border: 1px solid #013d98 !important;
}
/*###########*/
/*TC LIST *CENTER* STYLING*/
/*###########*/
/*UI CENTER, CENTER | UI LAYOUT, SOUTH, CENTER | HIDING OVERFLOW*/
.ui-layout-center > .ui-layout-center, .ui-layout-center > .ui-layout-south > .ui-layout-center {
overflow: hidden;
}
/*TCGRIDHEADER SEARCH SPAN AND TEXTBOX*/
.ui-pane-header > span {
/*wrapped span*/
position: absolute;
top: 2px;
right: 2px;
}
.ui-pane-header > span > input {
/*textbox*/
border: none;
}
/*TCLIST VIEW (TOTAL DIV FOR THINCLIENT LIST)*/
.tcListView {
position: absolute;
top: 0px;
bottom: 0px;
left: 0;
right: 0;
}
/*TCLIST ICONS*/
.tcListIcons {
display: inline-block;
color: whitesmoke;
}
.tcListIcons:hover {
cursor: pointer;
}
.tcListIcons > img {
height: 24px;
width: 24px;
padding-top: 1px;
}
/*SLICK HEADER COLUMNS*/
.slick-header-column:hover {
background: none;
font-weight: 700;
color: #013d98;
}
/*SLICK ROW HOVERED*/
.slick-row:hover, .slick-row.odd:hover, .slick-row:hover > .slick-cell.selected {
font-weight: 700;
color: #013d98;
background: rgba(95, 122, 157, 0.30);
}
/*ODD ROWS*/
.slick-row.odd {
background: #e2e2e2;
}
/*SELECTED CELL*/
.slick-row.selected .cell-selection {
background-color: transparent; /* show default selected row background */
}
/*EDITABLE CELLS*/
input.editor-text {
background: whitesmoke;
}
/*EACH CELL OF THINCLIENT LIST*/
.slick-cell {
border: none;
border-right: 1px dotted silver;
line-height: 23px;
}
/*CURRENT ACTIVE CELL*/
.slick-cell.active {
border: none;
border-right: 1px dotted silver;
}
/*CURRENT SELECTED CELL(S)*/
.slick-cell.selected {
background-color: #82a2d1;
color: whitesmoke;
border-top: 1px solid #6a83a8;
border-bottom: 1px solid #6a83a8;
}
/*CELLS THAT HAVE STATUS IMAGES*/
.tcStatusImg {
/*vertical-align: middle;*/
margin-left: auto;
margin-right: auto;
margin-top: -2px;
vertical-align: middle !important;
}
/*CELL NAME ATTRIBUTE*/
.cell-title {
font-weight: bold;
}
.cell-effort-driven {
text-align: center;
}
.cell-selection {
border-right-color: silver;
border-right-style: solid;
background: #f5f5f5;
color: gray;
text-align: right;
font-size: 10px;
}
/*TCLOGLIST LOADING INDICATOR*/
.tcLogLoading {
width: 100%;
vertical-align: middle;
height: 75%;
}
/*TCLISTPAGER (BOTTOM DIV OF THINCLIENT LIST)*/
.tcListPager {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 26px;
}
.slick-pager {
position: absolute;
bottom: 0;
left: 0;
right: 0;
border: none;
height: 26px;
background: #88919c;
/*background: #5E7185;*/
color: whitesmoke;
}
/*TCLISTPAGER BOTTOM ICONS HOVER*/
.ui-state-hover {
color: #013d98;
}
/*CENTERING WRAPPER FOR LOADING ICON*/
.loadingModalMask {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
/*no opacity declaration, due to inheritance!*/
background: rgba(245,245,245,0.6);
z-index: 10;
display: none;
}
.centerWrapper {
/*margin: 35% auto 0 auto;*/
border: 1px solid #014d98;
background: #4d749e;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
color: whitesmoke;
}
.loading-gif, .loading-text {
display: table-cell;
vertical-align: middle;
padding: 5px 5px 2px 5px;
}
.loading-text {
padding-right: 10px;
}
/*LOADING INDICATOR FOR THIN CLIENT LIST*/
.loading-indicator {
position: absolute;
top: -45%;
left: -45%;
display: inline-block;
padding: 12px;
background: white;
font-weight: bold;
border: 1px solid #181818;
-moz-box-shadow: 0 0 5px #013d98;
-webkit-box-shadow: 0px 0px 5px #013d98;
z-index: 100;
}
.loading-indicator label {
padding-left: 20px;
background: url('../images/ajax-loader-small.gif') no-repeat center left;
}
/*SLICK COLUMN PICKER CONTEXT MENU*/
.slick-columnpicker {
width: 150px;
height: auto;
background: whitesmoke;
border: 1px solid #919191;
box-shadow: 2px 2px 2px #666;
padding: 5px 5px 7px 0px;
margin: 0;
}
/*ELEMENTS OF THE COLUMNPICKER CONTEXT MENU */
.cp-container {
position: relative;
display: block;
width: 100%;
height: 22px;
}
.cp-container:hover {
font-weight: 700;
color: #013d98;
}
/*COLUMNPICKER CONTEXT INPUTS AND NOT RESET BUTTON*/
.cp-container input:not(.resetColumns) {
cursor: pointer;
padding: 2px;
}
/*COLUMN PICKER CONTEXT MENU LABEL TEXT *DIV* */
.cp-label {
cursor: default;
padding: 2px;
}
.cp-label:hover {
}
/*COLUMN PICKER CONTEXT MENU TEXT AND INPUTS*/
.cp-container input:not(.resetColumns), .cp-label {
float: left;
vertical-align: middle;
}
/*COLUMN PICKER CONTEXT MENU RESET BUTTON*/
.cp-container > .resetColumns {
position: absolute;
left: 18px;
right: 15px;
}
.cp-container > .resetColumns:hover {
color: #013d98;
font-weight: 700;
}
/*COLUMN PICKER CONTEXT MENU LINE BREAK FOR*/
.hr {
background: #e2e2e2;
padding: 0px 0 0px 0;
}
/*SLICK CONTEXT MENU FOR THINCLIENTS*/
.context-menu-list {
max-width: none;
width: auto;
border: 1px solid #919191;
}
/*SLICK CONTEXT MENU ITEM */
.context-menu-item {
padding: 4px 2px 4px 15px;
}
/*SLICK CONTEXT MENU ITEM *LI* HOVER, NO SEPERATOR*/
.context-menu-list > li:not(.context-menu-separator .disabled):hover {
background: rgba(95, 122, 157, 0.30);
}
/*SLICK CONTEXT MENU ITEM TEXT*/
.context-menu-item > span {
padding: 5px 25px 5px 5px;
white-space: nowrap;
}
/*SLICK CONTEXT MENU SUB MENU */
.context-menu-item > li > ul {
width: auto;
max-width: none;
}
/*SLICK CONTEXT MENU SIDE STYLE BAR */
.context-menu-list-sidebar {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 15px;
background: #c5c5c5;
}
/*SLICK CONTEXT MENU DISABLED ITEM*/
.disabled {
cursor: default;
}
/*SLICK CONTEXT MENU SEPERATOR*/
.context-menu-separator {
padding: 0;
border-color: #bebebe;
margin-left: 15px;
}
/*SLICK CONTEXT MENU SEPARATOR, SELECT SIDE BAR*/
.context-menu-separator > .context-menu-list-sidebar {
margin: 0 0 -1px -15px;
}
/*SLICK CONTEXT MENU INSERTING TRIANGLE INTO MENU*/
.context-menu-submenu:after {
content: attr(VNCPrompt-check) "\25ba";
color: #181818;
padding-top: 5px;
padding-left: 2px;
font-size: smaller;
}
/*SLICK CONTEXT MENU TRAINGLE DISABLED*/
.context-menu-item.context-menu-submenu.disabled:after {
color: #a5a5a5;
}
/*SLICK CONTEXT MENU INSERTING CHECK MARK INTO SIDE BAR*/
/*ADDED AND REMOVED THROUGH JQUERY*/
.context-menu-list-sidebar.context-checkmark:after {
content: "\2714";
color: #181818;
padding: 2px;
font-size: small;
vertical-align: middle;
}
/*SLICK PAGER EXPANDED OUT > A TAGS HOVER*/
span.slick-pager-settings-expanded > a:hover {
vertical-align: baseline;
}
span.slick-pager-settings-expanded > a:hover {
color: #181818;
}
/*TC PROP STYLING*/
.tcInfo-leftWrapper {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 150px;
overflow: visible;
}
.tcInfo-rightWrapper {
position: absolute;
top: 0;
left: 150px;
bottom: 0;
right: 0px;
}
.tcInfo-header {
height: 25px;
background: #A9B4C0;
display: block;
}
.tcInfo-title {
white-space: nowrap;
}
.tcInfo-label, .tcInfo-value {
display: block;
background: #f5f5f5;
white-space: nowrap;
}
.odd {
background: #e2e2e2;
}
.tcInfo-label, .tcInfo-value {
display: block;
height: 27px;
line-height: 28px;
}
.tcInfo-value:hover {
font-weight: 700;
color: #013d98;
background: rgba(95, 122, 157, 0.30);
}
.tcInfo-label {
text-align: right;
padding-right: 5px;
border-right: 1px dotted silver;
border-bottom: none;
}
.tcInfo-value {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-left: 5px;
border: none;
}
.tcInfo-title {
line-height: 25px;
padding-left: 10px;
}
/*###########*/
/*TC TREE STYLING*/
/*###########*/
/*OVERALL TC Tree*/
#tcTreeView {
position: absolute;
top: 25px;
left: 0;
right: 0;
bottom: 0;
overflow-y: auto;
overflow-x: hidden;
background: whitesmoke;
padding-left: 8px;
}
/*LI ELEMENTS*/
.jqtree-element.jqtree_common {
}
.jqtree-element:hover {
color: #013d98;
background: rgba(95, 122, 157, 0.30);
}
.jqtree-element:hover > .jqtree_common {
font-weight: 700;
color: #013d98;
}
/*SELECTED "FOLDER" NODE*/
ul.jqtree-tree li.jqtree-folder {
margin-bottom: 0px;
}
/*SELECTED NODE ATTR*/
ul.jqtree-tree li.jqtree-selected > .jqtree-element, ul.jqtree-tree li.jqtree-selected > .jqtree-element:hover {
background: #82a2d1;
}
li.jqtree-selected > div.jqtree-element > div.jqtree-title {
color: whitesmoke;
}
/*DIV CONTAINERS OF THE NODES */
li.jqtree_common > div.jqtree_common {
padding: 2px 7px 2px 0px;
}
/*ANCHOR TAGS *TRIANGLES* */
li.jqtree_common > div.jqtree-element > a.jqtree-toggler {
line-height: normal;
top: 0;
padding: 1px 0 2px 0;
color: #4d4d4d;
}
li.jqtree_common > div.jqtree-element > a.jqtree-toggler:hover {
color: #013d98;
}
/*TEXT NODE*/
li.jqtree_common > div.jqtree-element > div.jqtree-title {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding: 0 8px 0 0px;
}
/*###########*/
/*TC TREE GROUP INFO *WEST* STYLING*/
/*###########*/
/*BOTTOM WEST DIV WITH NODE *GROUP* INFO*/
.ui-layout-tctreedata {
position: absolute;
top: 25px;
left: 0;
right: 0;
bottom: 0;
overflow-y: auto;
overflow-x: hidden;
background: #cecece;
color: #181818;
}
/*TREE NODE | THINCLIENT GROUP INFO DIVS*/
.groupInfo-leftWrapper {
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 100px;
}
.groupInfo-rightWrapper {
position: absolute;
top: 0;
left: 100px;
bottom: 0;
right: 0px;
}
.groupInfo-label:nth-child(odd), .groupInfo-value:nth-child(odd) {
background: #e2e2e2;
}
.groupInfo-label, .groupInfo-value {
display: block;
height: 27px;
line-height: 28px;
background: #f5f5f5;
}
.groupInfo-value:hover {
font-weight: 700;
color: #013d98;
background: rgba(95, 122, 157, 0.30);
}
.groupInfo-label {
text-align: right;
padding-right: 5px;
border-right: 1px dotted silver;
border-bottom: none;
}
.groupInfo-value {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-left: 5px;
border: none;
}
/*###########*/
/*TC SPECIFIC *EAST* STYLING*/
/*###########*/
/*TCACTION DIV*/
.ui-layout-tcaction {
position: absolute;
top: 25px;
left: 0;
right: 0;
bottom: 0;
overflow-y: auto;
background: inherit;
padding-right: 8px;
color: #181818;
background: whitesmoke;
}
/*TCINFO DIV*/
.ui-layout-tcprop {
position: absolute;
top: 25px;
left: 0;
right: 0;
bottom: 0;
overflow-y: auto;
overflow-x: hidden;
color: #181818;
background: #cecece;
}
/*SLIDER*/
h2-macSlider {
white-space: nowrap;
}
.slideNav-macSlider {
position: absolute;
top: 0;
left: 0;
right: 0;
border: 1px solid lime;
height: 48px;
overflow: hidden;
background: #181818;
}
.back-macSlider, .forward-macSlider {
height: 48px;
width: 48px;
cursor: pointer;
z-index: 10;
}
.back-macSlider {
position: absolute;
top: 0;
left: 0;
background: yellow;
color: blue;
}
.forward-macSlider {
position: absolute;
top: 0;
right: 0;
background: yellow;
color: blue;
}
.title-macSlider {
position: absolute;
top: 0;
left: 0px;
right: 0px;
bottom: 0;
text-align: center;
background: #999;
}
.macSlider {
position: absolute;
top: 48px;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
border: 1px solid blue;
}
.slide {
position: absolute;
top: 0px;
left: 0;
right: 0;
bottom: 0;
overflow: auto;
}
/*###########*/
/*TC PROPERTIES*/
/*###########*/
/*DIALOG COLLAPSABILE*/
.tcProperties-tcInfoCenter {
display: none;
}
input.commentInput {
width: 95%;
}
/*###########*/
/*TC PROPERTIES*/
/*###########*/
.tcAddScheduledTask {
/*position:absolute;
left:40%;
top:30%;
z-index:10;*/
display: none;
background: #f4f4f4;
}
/*###########*/
/*ADD TASK WIZARD*/
/*###########*/
.addTaskWizard {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
}
.addTaskBody, .addTaskHeader {
display: block;
background: #eee;
overflow: hidden;
}
.addTaskHeader {
border-bottom: 1px solid #013d98;
}
.addTaskBody {
padding-bottom: 78px;
}
.addTaskHeader > h1 {
text-align: center;
background: #B6B5B5;
font-size: 16px;
padding: 4px;
margin-top: 0;
}
.addTaskHeader > p {
margin-left: 10px;
padding-right: 10px;
white-space: nowrap;
}
.addTaskHeader {
position: absolute;
left: 0px;
right: 0px;
top: 0px;
height: 70px;
}
.addTaskBody {
position: absolute;
left: 0px;
right: 0px;
top: 71px;
bottom: 0px;
}
/*SELECT TASK*/
.addTaskBody > .addTaskBodyName, .addTaskBody > .addTaskBodySelect {
display: block;
padding: 10px;
margin-right: 10px;
}
.addTaskBody > .addTaskBodyName > input, .addTaskBody > .addTaskBodySelect > input {
width: 100%;
margin-top: 5px;
}
.addTaskBody > .addTaskBodyName > label, .addTaskBody > .addTaskBodySelect > label {
width: 100%;
margin-top: 5px;
font-size: 12px;
}
.addTaskBody > .addTaskBodySelect > div > select {
margin-top: 5px;
padding: 2px;
}
.addTaskName {
display: block;
}
.addTaskSelect {
display: inline;
}
.addTaskSelectDate {
cursor: pointer;
padding-left: 2px;
}
.tcFirmwareList {
border: 1px solid #666;
background: whitesmoke;
}
.tcFirmwareList > div {
display: inline-block;
width: 128px;
vertical-align: top;
padding: 2px;
}
.tcFirmwareList > div > div {
cursor: pointer;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
margin-bottom: 2px;
margin-left: 2px;
padding: 1px;
color: #181818;
}
.tcFirmwareList > div > div:hover {
color: #013d98;
outline: 1px solid #013d98;
}
.tcFirmwareList > div > div.active {
background: #82a2d1;
color: whitesmoke;
outline: 1px solid #6a83a8;
}
/*UPLOADING PROGRESS*/
.tcFirmwareUpload {
}
.tcFirmProgLabel, .tcInstallFirmProgLabel, .tcUninstallFirmProgLabel {
text-align: center;
margin-top: 18px;
}
/*SELECT SCHEDULE*/
.addTaskFreq > div > span, .addTaskFreq > div > div, .addTaskFreq > div > select, .addTaskFreq > div > input, .addTaskTimeGroup > div, .addTaskTimeGroup > span {
vertical-align: middle;
display: inline-block;
}
.addTaskFreq {
padding: 10px 10px 0px 10px;
}
.addTaskFreq > div {
padding: 5px;
}
.addTaskOptions {
padding: 10px;
display: none;
}
.addTaskFreq > div > input, .addTaskFreq > div > span, .addTaskTimeGroup > span {
width: 150px;
}
.addTaskFreq > div > select {
width: 154px;
}
.addTaskFreq > div > div, .addTaskTimeGroup > div {
width: 70px;
text-align: right;
}
.addTaskTimeGroup {
margin-left: 6px;
margin-top: 10px;
}
.addTaskTimeGroup > div, .addTaskTimeGroup > span {
display: inline-block;
}
.addTaskFreqDays > input, .addTaskFreqDays > div {
display: inline-block;
vertical-align: middle;
}
.addTaskFreqDays > input:hover {
cursor: pointer;
}
/*ADD TASK SUMMARY*/
.addTaskSummary > div {
display: block;
margin-left: 10px;
}
.addTaskSummary > div > h2 {
border: none;
}
.addTaskSummary > div > h2, .addTaskSummary > div > p {
display: block;
}
.addTaskSummary > div > h2 {
padding: 4px 4px 4px 0;
margin-right: 10px;
}
.addTaskSummary > div > p {
margin-left: 4px;
padding-right: 10px;
}
/*###########*/
/*EDIT SCHEDULED TASK*/
/*###########*/
.tcEditScheduledTask > .slick-viewport > .grid-canvas {
padding-left: .5px;
}
.editTaskDialog > .ui-dialog-buttonpane > .ui-dialog-buttonset {
width: 99%;
}
#editTaskCloseBtn {
float: right;
}
/*###########*/
/*EDIT SCHEDULED TASK WINDOW*/
/*###########*/
.tcEditTaskWindow > div {
/*wrapper row divs*/
display: block;
margin-top: 9px;
}
.tcEditTaskWindow > div > div, .tcEditTaskWindow > div > input,
.tcEditTaskWindow > div > select, .tcEditTaskWindow > div > textarea {
display: inline-block;
}
.tcEditTaskWindow > div > div:not(.etwIntWrap,.etwFWWrap), .etwIntWrap > div {
/*lables*/
width: 70px;
text-align: left;
padding-left: 5px;
}
.tcEditTaskWindow > div > input, .tcEditTaskWindow > div > select {
/*inputs*/
width: 250px;
}
.editTaskFreqDays > input, .editTaskFreqDays > div, .etwIntWrap > div, .etwIntWrap > span {
display: inline-block;
}
.tcEditTaskWindow > div > button {
position: relative;
}
.tcEditTaskWindow > div > textarea {
width: 280px;
margin-right: 10px;
}
.editTaskSelectDate, .addTaskSelectDate {
cursor: pointer;
}
.editTaskTimeSpinner, .addTaskTimeSpinner {
cursor: default;
}
.etwFWWrap {
display: block !important;
}
.etwFWWrap div {
display: inline-block;
padding: 5px;
}
/*###########*/
/*MOVE TC*/
/*###########*/
.mouseFollow {
position: absolute;
z-index: 20;
background: whitesmoke;
/*border: 1px solid #888;
box-shadow: 1px 1px 1px #181818;*/
}
.tcMove {
padding: 5px;
}
/*###########*/
/*MOVE TO GROUP */
/*###########*/
.moveOption div, .moveOption select {
display: block;
margin-top: 5px;
margin-bottom: 10px;
}
.moveOption select {
width: 260px;
}
/*###########*/
/*NEW GROUP */
/*###########*/
.treeGrpTop > div > div, .treeGrpTop > div > input, .treeGrpTop > div > button {
display: inline-block;
vertical-align: middle;
}
.treeGrpTop > div {
margin-top: 7px;
}
.treeGrpTop > div:nth-child(3) {
/*select the last div*/
margin: 14px;
}
.treeGrpTop > div > div:not(:nth-child(2)):not(.tgConfigBtns) {
/*select only the first 2, name and desc*/
text-align: right;
width: 75px;
margin-right: 8px;
}
.treeGrpTop > div > input:not(:nth-child(1)) {
/*top inputs*/
width: 180px;
}
.treeGrpTop > div > button {
/*top buttons*/
font-size: 12px;
float: right;
}
.treeGrpBtm > div {
/*both left - right divs*/
display: inline-block;
vertical-align: top;
}
.treeGrpBtm fieldset {
/*both left - right fieldset*/
width: 262px;
}
.treeGrpBtm fieldset > legend > input {
/*fieldset legends and inputs*/
vertical-align: middle;
margin-top: 0;
}
/*filter platform*/
.tgLeft, .tgRight {
display: inline-block;
vertical-align: top;
margin-left: 10px;
}
.treeGrpPlatform input[type="radio"] {
margin: 0;
}
.tgLeft > div {
display: block;
margin-top: 10px;
}
.tgLeft > div > div, .tgRight > div:nth-child(1) > div {
margin-left: 7px;
}
.tgLeft > div > input, .tgLeft > div > div {
display: inline-block;
vertical-align: middle;
}
.tgRight > div {
margin-top: 10px;
margin-bottom: 5px;
}
.tgRight > div:nth-child(1) > input, .tgRight > div:nth-child(1) > div {
display: inline-block;
vertical-align: middle;
}
.tgRight > div:nth-child(2) {
margin-top: 0px;
margin-left: 15px;
margin-bottom: 10px;
}
.tgRight > div:nth-child(2) > div {
display: block;
}
.tgRight > div:nth-child(2) > div > input, .tgRight > div:nth-child(2) > div > div {
display: inline-block;
vertical-align: middle;
}
fieldset.treeGrpPlatform > div:nth-child(2), fieldset.treeGrpModel > div, fieldset.treeGrpVersion > div, fieldset.treeGrpMAC > div, fieldset.treeGrpCompName > div {
display: block;
margin: 8px;
}
fieldset.treeGrpModel > div, fieldset.treeGrpVersion > div, fieldset.treeGrpMAC > div, fieldset.treeGrpCompName > div {
display: block;
margin: 8px;
}
.treeGrpBtm {
margin-top: 15px;
}
.treeGrpBtm fieldset {
margin-bottom: 8px;
}
.treeGrpBtm fieldset button {
margin-top: 10px;
margin-left: 65px;
}
.treeGrpLeft fieldset:nth-child(1), .treeGrpRight fieldset:nth-child(1) {
height: 130px;
}
.treeGrpLeft fieldset:not(:nth-child(1)), .treeGrpRight fieldset:not(:nth-child(1)) {
height: 110px;
}
fieldset.treeGrpIP > div:nth-child(3) {
margin-left: 35px;
margin-top: 10px;
}
fieldset.treeGrpIP .ipInputWrapper {
margin-top: 5px;
}
fieldset.treeGrpIP .ipInputWrapper div, fieldset.treeGrpIP .ipInputWrapper input {
display: inline-block;
}
fieldset.treeGrpIP .ipInputWrapper div {
vertical-align: bottom;
margin-left: 2px;
}
fieldset.treeGrpIP .ipInputWrapper div:nth-child(1) {
text-align: right;
width: 30px;
vertical-align: middle;
margin-right: 5px;
}
fieldset.treeGrpIP .ipInputWrapper input {
margin: 0;
vertical-align: middle;
}
.tgConfigBtns {
margin-left: 30px;
}
button#tgHideOpts {
position: absolute;
left: 15px;
}
/*Group Add Filter Dialogs*/
.tcNewGroupList > div {
color: #181818;
}
.tcNewGroupList > div.active {
background: #82a2d1;
color: whitesmoke;
outline: 1px solid #6a83a8;
}
.tcNewGroupList {
outline: 1px solid #013d98;
margin-top: 10px;
height: 150px;
overflow-y: auto;
background: whitesmoke;
}
.tcNewGroupList > div:hover {
color: #013d98;
outline: 1px solid #013d98;
}
.tcNewGroupListButtons {
margin-top: 10px;
}
.tcNewGroupListButtons > button {
margin-left: 2px;
}
.filterAdd > div, .filterAdd > input {
display: inline-block;
vertical-align: middle;
}
.filterAdd > input {
margin-left: 10px;
width: 250px;
}
/*selected FW*/
.tgTempSelectedWrap {
margin: 10px;
width: auto !important;
text-align: left !important;
margin-left: 24px;
}
.tgTempSelectedWrap > div {
display: inline-block;
color: #ccc;
}
.tgTempSelected {
margin-left: 10px;
}
/*###########*/
/*CLONE FROM ANOTHER */
/*###########*/
img.cloneAnotherIcon {
vertical-align: middle;
}
img.cloneAnotherIcon {
vertical-align: middle;
}
.tcCloneAnotherDialog > div {
margin-top: 5px;
}
div#tcCloneAnotherView {
margin-top: 10px;
bottom: 0px !important;
}
/*###########*/
/*NEW COMP NAME */
/*###########*/
input.newCompName {
width: 98%;
}
/*###########*/
/*GEN TEMPLATE */
/*###########*/
.selTemplateName, .templateName {
display: inline-block;
}
.templateName {
width: 250px;
margin-left: 5px;
}
/*###########*/
/*Apply TEMPLATE */
/*###########*/
.tcTempList {
border: 1px solid #666;
background: whitesmoke;
position: absolute;
overflow: auto;
left: 10px;
right: 10px;
bottom: 40px;
top: 50px;
}
.applyTempWrap {
margin: 2px 0 2px 0;
}
.applyTempWrap > img, .applyTempWrap > div {
display: inline-block;
vertical-align: middle;
}
.tcTempList > div:hover {
color: #013d98;
outline: 1px solid #013d98;
}
.tcTempList > div.active {
background: #82a2d1;
color: whitesmoke;
outline: 1px solid #6a83a8;
}
.tcTempList > div.active > div {
color: whitesmoke;
}
.tempPushWrap {
position: absolute;
left: 10px;
right: 10px;
bottom: 10px;
}
.tempPushWrap > input, .tempPushWrap > div {
display: inline-block;
vertical-align: middle;
}
.tempPushWrap > div {
margin-left: 10px;
}
/*###########*/
/*DELETE TC*/
/*###########*/
.deleteConfigWrap > input, .deleteConfigWrap > div {
display: inline-block;
vertical-align: middle;
}
/*###########*/
/*ONLINE MANUAL*/
/*###########*/
.onlineMan {
}
/*manual left side*/
.manLeft {
position:absolute;
left:0;
top:0;
bottom:0;
width:150px;
background: #345FA0;
overflow-x: hidden;
}
.manTree {
color:#f2f2f2;
font-size:12px;
margin:10px 0px 10px 5px;
}
.manTree div{
padding: 5px;
cursor:pointer;
font-size:15px;
white-space: nowrap;
}
.manTree div:hover{
background:#448FE0;
}
.manTree div.manCat-active{
background:#88919c;
}
.manCat-sub {
margin-left: 5px;
font-size: 12px !important;
}
.manCat-sub-sub {
margin-left: 10px;
font-size: 12px !important;
}
/*manual right side*/
.manRight {
position:absolute;
right:0;
top:0;
bottom:0;
left:150px;
background: #f2f2f2;
overflow:hidden;
}
.manInfo > div:not(:first-child){
display:none;
}
.manHeader{
position:absolute;
left:0;
right:0;
top:0;
height:15px;
color:whitesmoke;
background:#88919c;
text-align:center;
padding-top:10px;
padding-bottom:10px;
}
.manDoc{
position:absolute;
left:0;
right:0;
bottom:0;
top:35px;
overflow:auto;
}
.manDoc > .section, .sectionInfo > .section{
font-weight: bold;
padding: 10px;
}
.manDoc > .sectionInfo {
padding: 5px 10px 5px 10px;
}
.manDoc div, .manDoc i, .manDoc li, .manDoc li b, .manDoc li i {
font-size: 13px;
}
.sectionInfo > ul li {
margin-top:10px;
margin-bottom:10px;
}
.sectionInfo .original{
padding:1px;
}
.sectionInfo button{
color:#414042;
}
.sectionInfo button:not(.original) {
font-size:11px;
padding:1px;
}
.sectionInfo input[type="checkbox"] {
padding:0;
margin:0;
vertical-align:middle;
}
/* images*/
.sectionInfo ul li img {
height: 20px;
/*vertical-align: middle;*/
}
.sectionInfo .smallImg {
height: 20px;
vertical-align: middle;
}
/*interactive elements*/
/*mock-up header*/
.headerExample{
white-space: nowrap;
font-size:0 !important;
}
.headerExample .ui-sortable-placeholder{
visibility:visible !important;
background: #aaa;
}
.headColumn{
font-size:13px;
padding:4px;
background: #e6e6e6;
border-right: 1px solid silver !important;
display:inline-block;
list-style:none;
cursor:pointer;
color:rgb(85, 85, 85);
height:24px;
width: 75px;
min-width: 50px;
max-width:150px;
white-space:nowrap;
overflow: hidden;
margin:0;
padding:0;
}
.headColumn > div:not(.head-handle-e):not(.down){
vertical-align:middle;
margin-top:5px;
margin-left: 10px;
}
.headColumn > .head-handle-e{
position:absolute;
width:10px;
right:0;
top:0;
bottom:0;
}
.headColumn:hover{
color:#013d98;
background:#dddddd;
}
.stat{
width:24px !important;
min-width: 24px
}
.stat > .down{
margin:8px 5px 1px 5px;
padding:0;
width: 0;
height: 0;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-top: 8px solid #345FA0;
}
/*main menu tabs*/
.sectionInfo > div[role="tab"] {
display:inline-block;
position:relative;
list-style:none;
width: auto;
border-color: ##9E9E9E;
}
.sectionInfo > div[role="tab"] > a {
margin-left:1px;
padding:5px;
border: none !important;
color: #414042;
}
/*context menu examples*/
.context-example > div{
display:inline-block;
padding:8px;
margin:15px;
outline:1px solid #345FA0;
cursor:pointer;
}
.context-example > div:hover {
background:#e6e6e6;
color:#345FA0;
}
/*###########*/
/*ABOUT DIALOG*/
/*###########*/
.aboutDialogWrap {
}
.aboutHeader {
margin-bottom: 10px;
border: 1px solid #4d749e;
background-image: -ms-linear-gradient(top, #EDF4FF 0%, #4D749E 100%);
background-image: -moz-linear-gradient(top, #EDF4FF 0%, #4D749E 100%);
background-image: -o-linear-gradient(top, #EDF4FF 0%, #4D749E 100%);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #EDF4FF), color-stop(1, #4D749E));
background-image: -webkit-linear-gradient(top, #EDF4FF 0%, #4D749E 100%);
background-image: linear-gradient(to bottom, #EDF4FF 0%, #4D749E 100%);
color: #353535;
}
.aboutHeader > div {
display:block;
margin:5px;
text-align:center;
font-size: 14px;
font-weight:bold;
}
.aboutHeader .aboutImage > img {
display:block;
margin-left: auto;
margin-right: auto;
}
.aboutDialogWrap .aboutTour {
margin:15px;
padding:5px;
text-align:center;
border:1px solid #1D68B3;
border-radius: 3px;
cursor:pointer;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
.aboutDialogWrap .aboutFooter {
background: #4D749E;
color: whitesmoke;
padding-top:5px;
padding-bottom:5px;
margin-top:10px;
}
.aboutDialogWrap .aboutFooter > div {
margin-left:12px;
}
/*about content*/
.aboutContent {
max-height: 250px;
overflow: auto;
color: #353535;
}
.aboutContent div{
display:block;
}
.aboutContent > div:not(.aboutContact) > div{
display:inline-block;
padding:5px;
font-size:14px;
}
.aboutContent > div:not(.aboutContact):hover{
color: #013d98;
background: rgba(95, 122, 157, 0.30);
}
.aboutContent > div:not(.aboutContact) > div:first-child{
font-weight:bold;
color: #4d749e;
margin-right: 5px;
}
.aboutContent > div:not(.aboutContact) > a{
outline:none;
border:none;
text-decoration:none !important;
font-weight:bold;
color: #f3972e;
}
.aboutContact{
margin-left:10px;
}
.aboutContact > div{
display:block;
padding:5px;
}
.aboutContact > div > div{
display:block;
padding:2px;
}
.aboutContact > .aboutContactHeader{
color: #f3972e;
font-size: 13px;
font-family: arial;
}
.aboutContact > div > div:first-child{
color: #4d749e;
}
.aboutContact > div > div > a{
text-decoration:none;
color: #f3972e;
}
.aboutContact > div > div > a:hover{
color: #4d749e;
}
.aboutContact > div > div:not(first-child){
display:inline-block;
}
/*###########*/
/*INFO BALLOONS*/
/*###########*/
.balloon-not-selectable {
-moz-user-select: none;
-html-user-select: none;
-webkit-user-select: none;
-o-user-select: none;
cursor: default;
}
.infoBalloon {
position: absolute;
z-index: 1;
cursor: default;
/*background-image: -ms-linear-gradient(top, #F2F2F2 0%, #999999 100%);
background-image: -moz-linear-gradient(top, #F2F2F2 0%, #999999 100%);
background-image: -o-linear-gradient(top, #F2F2F2 0%, #999999 100%);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #F2F2F2), color-stop(1, #999999));
background-image: -webkit-linear-gradient(top, #F2F2F2 0%, #999999 100%);
background-image: linear-gradient(to bottom, #F2F2F2 0%, #999999 200%);*/
box-shadow: 3px 3px 3px #414042;
color: #414042;
background: #f2f2f2;
}
.infoBalloonNext {
cursor: pointer;
position: absolute;
bottom: 0px;
left: 0;
right: 0;
text-align: center;
color: #013d98;
font-weight: bolder;
cursor: pointer;
}
.infoBalloon-nextText {
margin: 7px;
}
.infoText {
padding: 8px;
margin-bottom: 25px;
max-width: 300px;
cursor: default;
}
.infoModal {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 10;
background-color: rgba(65, 64, 66, .3);
cursor: default;
}
.infoBalloon-clickAnywhere {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 100;
background: transparent;
cursor: default;
}
.arrow-left {
position: absolute;
width: 0;
height: 0;
border-top: 12px solid transparent;
border-bottom: 12px solid transparent;
border-right: 12px solid #f2f2f2;
cursor: default;
}
.arrow-right {
position: absolute;
width: 0;
height: 0;
border-top: 12px solid transparent;
border-bottom: 12px solid transparent;
border-left: 12px solid #f2f2f2;
cursor: default;
}
.arrow-top {
position: absolute;
width: 0;
height: 0;
border-left: 12px solid transparent;
border-right: 12px solid transparent;
border-bottom: 12px solid #f2f2f2;
cursor: default;
}
.arrow-bottom {
position: absolute;
width: 0;
height: 0;
border-left: 12px solid transparent;
border-right: 12px solid transparent;
border-top: 12px solid #f2f2f2;
cursor: default;
}
/*################*/
/*CONFIG DIALOG*/
/*################*/
.xmlConfigTop, .xmlConfigBtm {
display:block;
}
.xmlConfigBtm{
margin-top:10px;
}
.xmlConfigHeader > img{
margin-left:15px;
}
.xmlConfigCat, .xmlConfigSett{
display:inline-block;
min-height: 100%;
vertical-align: top;
height:300px;
overflow:auto;
}
.xmlConfigCat{
outline:1px solid #414042;
width:100px;
margin-right:5px;
background:#fff;
}
.xmlCatDiv{
display:block;
padding:7px 10px 7px 5px;
cursor:pointer;
}
.xmlCatDiv:hover {
background:#82a2d1;
}
.xmlCatDiv.active {
background:#4d749e;
color:whitesmoke;
}
.xmlConfigSett{
outline:1px solid #414042;
overflow-x:hidden;
}
.xmlConfigSett, .xmlConfigPage {
width: 375px;
}
.xmlConfigPage > div{
display:block;
}
.xmlSettHeader{
text-align:center;
padding:7px;
background: #4d749e;
color: whitesmoke;
}
.xmlSettWrap{
margin:15px 15px 5px 5px;
}
.xmlSettLbl, .xmlConfigInput{
display:inline-block;
}
.xmlSettLbl{
width:125px;
}
.xmlSettVal {
vertical-align: middle;
} | 10zig | trunk/test/masterStyleSheet.css | CSS | art | 49,045 |
#!/bin/sh
cat <<EOF
Content-type: video/flv
EOF
exec /sbin/wget -O - --post-data `echo $QUERY_STRING|sed "s_\&_\&_g"` "http://213.152.174.187/mvmu.php"
| 1073s | trunk/php1/mv.cgi | Shell | gpl3 | 158 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
$tit=urldecode($queryArr[2]);
}
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Press 2 for download, 3 for download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="justify" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=32
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="55" offsetYPC="52" widthPC="18" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<text redraw="yes" align="center" offsetXPC="75" offsetYPC="52" widthPC="20" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(pub); pub;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(titlu); titlu;</script>
</text>
<image redraw="yes" offsetXPC=63 offsetYPC=20 widthPC=25 heightPC=30>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "14"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if( userInput == "two")
{
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + getItemInfo(getFocusItemIndex(),"download") + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
function sec2hms ($sec, $padHours = false)
{
$hms = "";
$hours = intval(intval($sec) / 3600);
$hms .= ($padHours)
? str_pad($hours, 2, "0", STR_PAD_LEFT). ":"
: $hours. ":";
$minutes = intval(($sec / 60) % 60);
$hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT). ":";
$seconds = intval($sec % 60);
$hms .= str_pad($seconds, 2, "0", STR_PAD_LEFT);
return $hms;
}
$pg=25*($page-1) +1;
$t1=explode("?",$search);
$search=$t1[0];
$link=$search."?start-index=".$pg ;
$link=str_replace("&","&",$link);
$html = file_get_contents($link);
echo '
<channel>
<title>'.$tit.'</title>
<menu>main menu</menu>
';
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
if($search) {
$url = $url.$search.",".urlencode($tit);
}
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<durata></durata>
<pub></pub>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
$videos = explode('<entry>', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
//$id = str_between($video,"<id>http://gdata.youtube.com/feeds/api/videos/","</id>");
preg_match('/youtube\.com\/(v\/|watch\?v=)([\w\-]+)/', $video, $match);
$id = $match[2];
$title = str_between($video,"<title type='text'>","</title>");
$descriere=str_between($video,"<content type='text'>","</content>");
$durata = sec2hms(str_between($video,"duration='","'"));
$data = str_between($video,"<updated>","</updated>");
$data = str_replace("T"," ",$data);
$data = str_replace("Z","",$data);
$data=explode(" ",$data);
$data=$data[0];
$image = "http://i.ytimg.com/vi/".$id."/2.jpg";
$link = "http://www.youtube.com/watch?v=".$id;
$link="http://127.0.0.1/cgi-bin/scripts/util/yt.php?file=".$link;
//$link=str_replace("&","&",$link);
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".mp4";
echo '
<item>
<title>'.$title.'</title>
<onClick>
showIdle();
url="'.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$durata.'</durata>
<pub>'.$data.'</pub>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
if($search) {
$url = $url.$search.",".urlencode($tit);
}
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<durata></durata>
<pub></pub>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/php1/y.php | PHP | gpl3 | 8,913 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$id = $_GET["id"];
$post ="url=http://www.megavideo.com/?v=".$id;
if (function_exists('curl_init')) {
$Curl_Session = curl_init('http://www.megavideonotimelimit.com/Streamer/');
curl_setopt ($Curl_Session, CURLOPT_POST, 1);
curl_setopt ($Curl_Session, CURLOPT_POSTFIELDS, $post);
curl_setopt ($Curl_Session, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($Curl_Session, CURLOPT_HEADER ,0); // DO NOT RETURN HTTP HEADERS
curl_setopt($Curl_Session, CURLOPT_RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL
$Rec_Data = curl_exec ($Curl_Session);
curl_close ($Curl_Session);
} else { // pseudo curl
exec ("rm -f /tmp/mega.txt");
$ua='"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ro; rv:1.9.1) Gecko/20090624 Firefox/3.5 GTB7.1"';
$post='"'.$post.'"';
$ref='"Referer: http://www.megavideonotimelimit.com/Streamer/"';
$app='"Content-Type: application/x-www-form-urlencoded"';
$exec = "/sbin/wget -q --header ".$ua." --header ".$ref." --header ".$app." --post-data ".$post." -O /tmp/mega.txt http://www.megavideonotimelimit.com/Streamer/";
exec ($exec);
$Rec_Data = file_get_contents("/tmp/mega.txt");
}
$url = urldecode(str_between($Rec_Data,'flashvars="file=','&'));
$url = str_replace("%2F","/",$url);
$url = str_replace("%3A",":",$url);
$url = str_replace("%3F","?",$url);
$url = str_replace("%3D","=",$url);
$link = str_replace("%26","&",$url);
print $link;
?>
| 1073s | trunk/php1/.svn/text-base/mega.php.svn-base | PHP | gpl3 | 1,685 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
// For users without megavideo account
// It downloads the video in flv format
// It doesnt work if the file is hosted on free hosting.
// In firefox and vlc the video stops at minute 10 unless you modifired the php.ini of the website where you hosted the file
// In case that the files is hosted on the player, the video also stops at minute 10 if remember right... I don't know how to solve it
// How to call the file: http://website.com/mvfreeflv.php?video_id=IDOFTHEVIDEO
function mv_decrypt($str_hex, $key1, $key2){
$str_bin = "";
// 1. Convert hexadecimal string to binary string
for($i = 0; $i < 128; $i++){
$str_bin .= floor(hexdec($str_hex[floor($i/4)])/pow(2,(3-($i%4))))%2;
}
// 2. Generate switch and XOR keys
$key = Array();
for ($i = 0; $i < 384; $i++){
$key1 = ($key1 * 11 + 77213) % 81371;
$key2 = ($key2 * 17 + 92717) % 192811;
$key[$i] = ($key1 + $key2) % 128;
}
// 3. Switch bits positions
for ($i = 256; $i >= 0; $i--){
$temp = $str_bin[$key[$i]];
$str_bin[$key[$i]] = $str_bin[$i%128];
$str_bin[$i%128] = $temp;
}
// 4. XOR entire binary string
for ($i = 0; $i < 128; $i++){
$str_bin[$i] = $str_bin[$i] ^ $key[$i+256] & 1;
}
// 5. Convert binary string back to hexadecimal
$str_hex = "";
for($i = 0; $i < 32; $i++){
$str_hex .= dechex(bindec(substr($str_bin, $i*4, 4)));
}
// 6. Return counted string
return $str_hex;
}
// Is set the "file" variable?
if(isset($_GET["video_id"])){
// Does player send video position?
$pos = (isset($_GET["pos"]) ? intval($_GET["pos"]) : "");
//Obtain Megavideo ID from link
$megavideo_id = $_GET["video_id"];
// Obtain Megavideo XML playlist file
if ($content = @file_get_contents("http://www.megavideo.com/xml/videolink.php?v=".$megavideo_id)){
// Parameters which I want to obtain from XML;
$parameters = Array("un", "k1", "k2", "s", "size");
$success = true;
// Obtain parameters from XML one by one
for($i=0; $i<Count($parameters); $i++){
$success = $success && preg_match('/ ' . $parameters[$i] . '="([^"]+)"/', $content, $match);
$$parameters[$i] = $match[1];
}
if($success){
// Count "dkey" from obtained parameters
$dkey=mv_decrypt($un,$k1,$k2);
// set URL address of video file
$video_url = "http://www".$s.".megavideo.com/files/".$dkey."/".$pos;
// Send headers to browser
header("Content-Type: video/flv");
header("Content-Disposition: attachment; filename=video.flv;" );
header("Content-Length: ".$size);
// Read video file from Megavideo server
readfile($video_url);
}
}
}
?>
| 1073s | trunk/php1/.svn/text-base/megavideo.php.svn-base | PHP | gpl3 | 2,493 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
$tit=urldecode($queryArr[2]);
}
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Press 2 for download, 3 for download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="justify" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=32
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="55" offsetYPC="52" widthPC="18" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<text redraw="yes" align="center" offsetXPC="75" offsetYPC="52" widthPC="20" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(pub); pub;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(titlu); titlu;</script>
</text>
<image redraw="yes" offsetXPC=63 offsetYPC=20 widthPC=25 heightPC=30>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "14"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if( userInput == "two")
{
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + getItemInfo(getFocusItemIndex(),"download") + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
function sec2hms ($sec, $padHours = false)
{
$hms = "";
$hours = intval(intval($sec) / 3600);
$hms .= ($padHours)
? str_pad($hours, 2, "0", STR_PAD_LEFT). ":"
: $hours. ":";
$minutes = intval(($sec / 60) % 60);
$hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT). ":";
$seconds = intval($sec % 60);
$hms .= str_pad($seconds, 2, "0", STR_PAD_LEFT);
return $hms;
}
$pg=25*($page-1) +1;
$t1=explode("?",$search);
$search=$t1[0];
$link=$search."?start-index=".$pg ;
$link=str_replace("&","&",$link);
$html = file_get_contents($link);
echo '
<channel>
<title>'.$tit.'</title>
<menu>main menu</menu>
';
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
if($search) {
$url = $url.$search.",".urlencode($tit);
}
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<durata></durata>
<pub></pub>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
$videos = explode('<entry>', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
//$id = str_between($video,"<id>http://gdata.youtube.com/feeds/api/videos/","</id>");
preg_match('/youtube\.com\/(v\/|watch\?v=)([\w\-]+)/', $video, $match);
$id = $match[2];
$title = str_between($video,"<title type='text'>","</title>");
$descriere=str_between($video,"<content type='text'>","</content>");
$durata = sec2hms(str_between($video,"duration='","'"));
$data = str_between($video,"<updated>","</updated>");
$data = str_replace("T"," ",$data);
$data = str_replace("Z","",$data);
$data=explode(" ",$data);
$data=$data[0];
$image = "http://i.ytimg.com/vi/".$id."/2.jpg";
$link = "http://www.youtube.com/watch?v=".$id;
$link="http://127.0.0.1/cgi-bin/scripts/util/yt.php?file=".$link;
//$link=str_replace("&","&",$link);
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".mp4";
echo '
<item>
<title>'.$title.'</title>
<onClick>
showIdle();
url="'.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$durata.'</durata>
<pub>'.$data.'</pub>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
if($search) {
$url = $url.$search.",".urlencode($tit);
}
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<durata></durata>
<pub></pub>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/php1/.svn/text-base/y.php.svn-base | PHP | gpl3 | 8,913 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
}
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="justify" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="55" offsetYPC="52" widthPC="15" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<text redraw="yes" align="center" offsetXPC="72" offsetYPC="52" widthPC="23" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(pub); pub;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(titlu); titlu;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if( userInput == "two")
{
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + getItemInfo(getFocusItemIndex(),"download") + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
function sec2hms ($sec, $padHours = false)
{
$hms = "";
$hours = intval(intval($sec) / 3600);
$hms .= ($padHours)
? str_pad($hours, 2, "0", STR_PAD_LEFT). ":"
: $hours. ":";
$minutes = intval(($sec / 60) % 60);
$hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT). ":";
$seconds = intval($sec % 60);
$hms .= str_pad($seconds, 2, "0", STR_PAD_LEFT);
return $hms;
}
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
}
/*
http://gdata.youtube.com/feeds/api/users/nba/uploads?&start-index=1&max-results=25&v=2
*/
if(!$page) {
$page = 1;
}
$p=25*($page-1)+1;
$link="http://gdata.youtube.com/feeds/api/users/".$search."/uploads?start-index=".$p."&max-results=25&v=2";
$link=str_replace("&","&",$link);
$html = file_get_contents($link);
echo '
<channel>
<title>Uploads by '.$search.'</title>
<menu>main menu</menu>
';
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<durata></durata>
<pub></pub>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
$videos = explode('<entry>', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$id = str_between($video,"<id>http://gdata.youtube.com/feeds/api/videos/","</id>");
$title = str_between($video,"<title type='text'>","</title>");
$descriere=str_between($video,"<content type='text'>","</content>");
$durata = sec2hms(str_between($video,"duration='","'"));
$data = str_between($video,"<updated>","</updated>");
$data = str_replace("T"," ",$data);
$data = str_replace("Z","",$data);
$data=explode(" ",$data);
$data=$data[0];
$image = "http://i.ytimg.com/vi/".$id."/2.jpg";
$link = "http://www.youtube.com/watch?v=".$id;
$link="http://127.0.0.1/cgi-bin/scripts/util/yt.php?file=".$link;
//$link=str_replace("&","&",$link);
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".mp4";
echo '
<item>
<title>'.$title.'</title>
<onClick>
showIdle();
url="'.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$durata.'</durata>
<pub>'.$data.'</pub>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<durata></durata>
<pub></pub>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/php1/.svn/text-base/youtube_user.php.svn-base | PHP | gpl3 | 9,053 |
#!/bin/sh
cat <<EOF
Content-type: video/flv
EOF
exec /sbin/wget -O - --post-data `echo $QUERY_STRING|sed "s_\&_\&_g"` "http://213.152.174.187/mvmu.php"
| 1073s | trunk/php1/.svn/text-base/mv.cgi.svn-base | Shell | gpl3 | 158 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
// For users without megavideo account
// It downloads the video in flv format
// It doesnt work if the file is hosted on free hosting.
// In firefox and vlc the video stops at minute 10 unless you modifired the php.ini of the website where you hosted the file
// In case that the files is hosted on the player, the video also stops at minute 10 if remember right... I don't know how to solve it
// How to call the file: http://website.com/mvfreeflv.php?video_id=IDOFTHEVIDEO
function mv_decrypt($str_hex, $key1, $key2){
$str_bin = "";
// 1. Convert hexadecimal string to binary string
for($i = 0; $i < 128; $i++){
$str_bin .= floor(hexdec($str_hex[floor($i/4)])/pow(2,(3-($i%4))))%2;
}
// 2. Generate switch and XOR keys
$key = Array();
for ($i = 0; $i < 384; $i++){
$key1 = ($key1 * 11 + 77213) % 81371;
$key2 = ($key2 * 17 + 92717) % 192811;
$key[$i] = ($key1 + $key2) % 128;
}
// 3. Switch bits positions
for ($i = 256; $i >= 0; $i--){
$temp = $str_bin[$key[$i]];
$str_bin[$key[$i]] = $str_bin[$i%128];
$str_bin[$i%128] = $temp;
}
// 4. XOR entire binary string
for ($i = 0; $i < 128; $i++){
$str_bin[$i] = $str_bin[$i] ^ $key[$i+256] & 1;
}
// 5. Convert binary string back to hexadecimal
$str_hex = "";
for($i = 0; $i < 32; $i++){
$str_hex .= dechex(bindec(substr($str_bin, $i*4, 4)));
}
// 6. Return counted string
return $str_hex;
}
// Is set the "file" variable?
if(isset($_GET["video_id"])){
// Does player send video position?
$pos = (isset($_GET["pos"]) ? intval($_GET["pos"]) : "");
//Obtain Megavideo ID from link
$megavideo_id = $_GET["video_id"];
// Obtain Megavideo XML playlist file
if ($content = @file_get_contents("http://www.megavideo.com/xml/videolink.php?v=".$megavideo_id)){
// Parameters which I want to obtain from XML;
$parameters = Array("un", "k1", "k2", "s", "size");
$success = true;
// Obtain parameters from XML one by one
for($i=0; $i<Count($parameters); $i++){
$success = $success && preg_match('/ ' . $parameters[$i] . '="([^"]+)"/', $content, $match);
$$parameters[$i] = $match[1];
}
if($success){
// Count "dkey" from obtained parameters
$dkey=mv_decrypt($un,$k1,$k2);
// set URL address of video file
$video_url = "http://www".$s.".megavideo.com/files/".$dkey."/".$pos;
// Send headers to browser
header("Content-Type: video/flv");
header("Content-Disposition: attachment; filename=video.flv;" );
header("Content-Length: ".$size);
// Read video file from Megavideo server
readfile($video_url);
}
}
}
?>
| 1073s | trunk/php1/megavideo.php | PHP | gpl3 | 2,493 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
}
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="justify" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="55" offsetYPC="52" widthPC="15" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<text redraw="yes" align="center" offsetXPC="72" offsetYPC="52" widthPC="23" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(pub); pub;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(titlu); titlu;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if( userInput == "two")
{
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + getItemInfo(getFocusItemIndex(),"download") + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
function sec2hms ($sec, $padHours = false)
{
$hms = "";
$hours = intval(intval($sec) / 3600);
$hms .= ($padHours)
? str_pad($hours, 2, "0", STR_PAD_LEFT). ":"
: $hours. ":";
$minutes = intval(($sec / 60) % 60);
$hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT). ":";
$seconds = intval($sec % 60);
$hms .= str_pad($seconds, 2, "0", STR_PAD_LEFT);
return $hms;
}
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
}
/*
http://gdata.youtube.com/feeds/api/users/nba/uploads?&start-index=1&max-results=25&v=2
*/
if(!$page) {
$page = 1;
}
$p=25*($page-1)+1;
$link="http://gdata.youtube.com/feeds/api/users/".$search."/uploads?start-index=".$p."&max-results=25&v=2";
$link=str_replace("&","&",$link);
$html = file_get_contents($link);
echo '
<channel>
<title>Uploads by '.$search.'</title>
<menu>main menu</menu>
';
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<durata></durata>
<pub></pub>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
$videos = explode('<entry>', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$id = str_between($video,"<id>http://gdata.youtube.com/feeds/api/videos/","</id>");
$title = str_between($video,"<title type='text'>","</title>");
$descriere=str_between($video,"<content type='text'>","</content>");
$durata = sec2hms(str_between($video,"duration='","'"));
$data = str_between($video,"<updated>","</updated>");
$data = str_replace("T"," ",$data);
$data = str_replace("Z","",$data);
$data=explode(" ",$data);
$data=$data[0];
$image = "http://i.ytimg.com/vi/".$id."/2.jpg";
$link = "http://www.youtube.com/watch?v=".$id;
$link="http://127.0.0.1/cgi-bin/scripts/util/yt.php?file=".$link;
//$link=str_replace("&","&",$link);
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".mp4";
echo '
<item>
<title>'.$title.'</title>
<onClick>
showIdle();
url="'.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$durata.'</durata>
<pub>'.$data.'</pub>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<durata></durata>
<pub></pub>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/php1/youtube_user.php | PHP | gpl3 | 9,053 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$id = $_GET["id"];
$post ="url=http://www.megavideo.com/?v=".$id;
if (function_exists('curl_init')) {
$Curl_Session = curl_init('http://www.megavideonotimelimit.com/Streamer/');
curl_setopt ($Curl_Session, CURLOPT_POST, 1);
curl_setopt ($Curl_Session, CURLOPT_POSTFIELDS, $post);
curl_setopt ($Curl_Session, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($Curl_Session, CURLOPT_HEADER ,0); // DO NOT RETURN HTTP HEADERS
curl_setopt($Curl_Session, CURLOPT_RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL
$Rec_Data = curl_exec ($Curl_Session);
curl_close ($Curl_Session);
} else { // pseudo curl
exec ("rm -f /tmp/mega.txt");
$ua='"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ro; rv:1.9.1) Gecko/20090624 Firefox/3.5 GTB7.1"';
$post='"'.$post.'"';
$ref='"Referer: http://www.megavideonotimelimit.com/Streamer/"';
$app='"Content-Type: application/x-www-form-urlencoded"';
$exec = "/sbin/wget -q --header ".$ua." --header ".$ref." --header ".$app." --post-data ".$post." -O /tmp/mega.txt http://www.megavideonotimelimit.com/Streamer/";
exec ($exec);
$Rec_Data = file_get_contents("/tmp/mega.txt");
}
$url = urldecode(str_between($Rec_Data,'flashvars="file=','&'));
$url = str_replace("%2F","/",$url);
$url = str_replace("%3A",":",$url);
$url = str_replace("%3F","?",$url);
$url = str_replace("%3D","=",$url);
$link = str_replace("%26","&",$url);
print $link;
?>
| 1073s | trunk/php1/mega.php | PHP | gpl3 | 1,685 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
$img = "/usr/local/etc/www/cgi-bin/scripts/tv/image/telem.png";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="50"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="50"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(annotation); annotation;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=35 widthPC=30 heightPC=30>
<?php echo $img; ?>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
location = getItemInfo(idx, "location");
annotation = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<channel>
<title>Tele'M</title>
<menu>main menu</menu>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$html = file_get_contents("http://www.telem.ro/telem/");
$html = str_between($html,'<h3>Emisiuni</h3>','</ul>');
$videos = explode('<li', $html);
unset($videos[0]);
$videos = array_values($videos);
$img = "/usr/local/etc/www/cgi-bin/scripts/tv/image/telem.png";
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link ="http://www.telem.ro".$t2[0];
$title = str_between($video,'<span>','<');
$link=$host."/scripts/tv/locale/telem.php?query=,".$link.",".urlencode($title);
echo '
<item>
<title>'.$title.'</title>
<link>'.$link.'</link>
</item>
';
}
?>
</channel>
</rss>
| 1073s | trunk/tv/locale/telem_main.php | PHP | gpl3 | 5,127 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
$tit = urldecode($queryArr[2]);
}
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/locale/telem_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title><?php echo $tit; ?></title>
<menu>main menu</menu>
<?php
//http://www.telem.ro/telem/martor-incomod.html?start=10
if($page) {
$page1=10*($page-1);
if($search) {
$html = file_get_contents($search."?start=".$page1);
} else {
$html = file_get_contents($search."?start=".$page1);
}
} else {
$page = 1;
if($search) {
$html = file_get_contents($search);
} else {
$html = file_get_contents($search);
}
}
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
if($search) {
$url = $url.$search.",".urlencode($tit);
}
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$videos = explode('<tr class="sectiontableentry', $html);
unset($videos[0]);
$videos = array_values($videos);
$image = "http://www.telem.ro".str_between($html,'<img style="margin-right: 5px; margin-left: 10px; float: left;" src="','"');
$image="/usr/local/etc/www/cgi-bin/scripts/tv/image/telem.png";
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link = "http://www.telem.ro".$t2[0];
$t3 = explode('">', $t1[1]);
$t4 = explode('<', $t3[1]);
$title = trim($t4[0]);
$descriere=$title;
$data="";
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/locale/telem_link.php?file='.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$data.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
if($search) {
$url = $url.$search.",".urlencode($tit);
}
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/tv/locale/telem.php | PHP | gpl3 | 8,082 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="left" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=52 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(titlu); titlu;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/locale/1tvbacau_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>1tvbacau.ro</title>
<menu>main menu</menu>
<?php
$html = file_get_contents("http://www.1tvbacau.ro/video/");
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
function c($title) {
$title = str_replace("º","s",$title);
$title = str_replace("&Ordm;","S",$title);
$title = str_replace("þ","t",$title);
$title = str_replace("&Thorn;","T",$title);
$title = str_replace("î","i",$title);
$title = str_replace("Î","I",$title);
$title = str_replace("ã","a",$title);
$title = str_replace("Ã","I",$title);
$title = str_replace("ª","S",$title);
$title = str_replace("â","a",$title);
$title = str_replace("Â","A",$title);
return $title;
}
function getRewriteString($string) {
$string = htmlentities($string);
$string = preg_replace("/&(.)(acute|cedil|circ|ring|tilde|uml|horn);/", "$1", $string);
return $string;
}
function getRewriteString1($string) {
$string = htmlentities($string);
$string = preg_replace("/&(.)(acute|cedil|circ|ring|tilde|uml|horn|);/", "$1", $string);
return $string;
}
$videos = explode('<div class="my_wideo_other_link">', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link = htmlentities($t2[0]);
$t1=explode('src="',$video);
$t2=explode('"',$t1[1]);
$image=$t2[0];
$t3=explode(">",$t1[1]);
$t4=explode("<",$t3[1]);
$descriere=c(htmlentities($t4[0]));
$descriere=trim($descriere);
$title = trim(str_between($video,'">','</a>'));
$title = str_replace("&","&",$title);
$title = str_replace(" ","",$title);
$title = str_replace('"',"",$title);
$title = getRewriteString1($title);
$title = getRewriteString($title);
$title = str_replace("&","&",$title);
$title=c($title);
$durata="";
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/locale/1tvbacau_link.php?file='.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$durata.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
</channel>
</rss>
| 1073s | trunk/tv/locale/1tvbacau.php | PHP | gpl3 | 8,043 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if( userInput == "two" || userInput == "2")
{
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + getItemInfo(getFocusItemIndex(),"download") + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>ctvmedia.ro</title>
<menu>main menu</menu>
<?php
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
}
if ($page > 1) {
$page1 = 5* ($page - 1);
$html = file_get_contents("http://www.ctvmedia.ro/index.php?limitstart=".$page1);
} else {
$page = 1;
$html = file_get_contents("http://www.ctvmedia.ro/index.php");
}
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$image = "/usr/local/etc/www/cgi-bin/scripts/tv/image/ctvmedia.jpg";
$videos = explode('<div class="contentpaneopen">', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$link = str_between($video,'value="file=','&');
$link = str_replace(" ","%20",$link);
$title = trim(str_between($video,'<h2 class="contentheading">','</h2>'));
$data = trim(str_between($video,'<span class="createdate">','</span>'));
$descriere=str_between($video,'<p style="margin-bottom: 0in;">','<div');
$descriere = preg_replace("/(<\/?)([^>]*>)/e","",$descriere);
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>playItemURL("'.$link.'", 10);</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$data.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/tv/locale/ctvmedia.php | PHP | gpl3 | 7,537 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if( userInput == "two" || userInput == "2")
{
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + getItemInfo(getFocusItemIndex(),"download") + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>emaramures</title>
<menu>main menu</menu>
<?php
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
}
if ($page > 1) {
$html = file_get_contents("http://www.emaramures.ro/Video-Maramures/Default.aspx?Page=".$page);
} else {
$page = 1;
$html = file_get_contents("http://www.emaramures.ro/Video-Maramures/Default.aspx");
}
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$videos = explode('div class="VideoThumbContainer">', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1=explode('title="',$video);
$t2=explode('"',$t1[1]);
$t3=explode('-',$t2[0]);
echo $t3[1];
$descriere=$t2[0];
$title=$descriere;
$t1=explode('"NewsDate">la:',$video);
$t2=explode('<',$t1[1]);
$data="Data:".$t2[0];
$t1=explode('src="',$video);
$t2=explode('"',$t1[1]);
$image=$t2[0];
$link = substr($image, 0, -8).".flv";
$link=str_replace("Thumbs","FLV",$link);
if (strpos($link,"Users/Vasile") === false) {
$link=str_replace("%20"," ",$link);
$image=str_replace("%20"," ",$image);
$descriere = preg_replace("/(<\/?)([^>]*>)/e","",$descriere);
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>playItemURL("'.$link.'", 10);</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$data.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/tv/locale/emaramures.php | PHP | gpl3 | 7,695 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(titlu); titlu;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/locale/tvsatrm_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>tvsatrm.ro</title>
<menu>main menu</menu>
<?php
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
}
if($page) {
if($search) {
$html = file_get_contents($search."/".$page);
} else {
$html = file_get_contents("http://www.jurnal.tvsatrm.ro/cat/video/page/".$page."/");
}
} else {
$page = 1;
if($search) {
$html = file_get_contents($search);
} else {
$html = file_get_contents("http://www.jurnal.tvsatrm.ro/cat/video/");
}
}
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$videos = explode('<div class="post">', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link = $t2[0];
$t1 = explode('src="', $video);
$t2 = explode('"', $t1[1]);
$image = $t2[0];
$t1 = explode('alt="', $video);
$t2 = explode('"', $t1[1]);
$title = $t2[0];
$t1=explode("<p>",$video);
$t2=explode("</p>",$t1[1]);
$descriere=$t2[0];
$t1=explode('<div class="postinfo">',$video);
$t2=explode('|',$t1[1]);
$data=trim($t2[0]);
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/locale/tvsatrm_link.php?file='.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$data.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/tv/locale/tvsatrm.php | PHP | gpl3 | 8,233 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$html = file_get_contents($link);
$link = "http://www.infotv.ro".str_between($html, "videoFile=", "'");
print $link;
?>
| 1073s | trunk/tv/locale/.svn/text-base/infotv_link.php.svn-base | PHP | gpl3 | 424 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(titlu); titlu;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/locale/tvsatrm_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>tvsatrm.ro</title>
<menu>main menu</menu>
<?php
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
}
if($page) {
if($search) {
$html = file_get_contents($search."/".$page);
} else {
$html = file_get_contents("http://www.jurnal.tvsatrm.ro/cat/video/page/".$page."/");
}
} else {
$page = 1;
if($search) {
$html = file_get_contents($search);
} else {
$html = file_get_contents("http://www.jurnal.tvsatrm.ro/cat/video/");
}
}
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$videos = explode('<div class="post">', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link = $t2[0];
$t1 = explode('src="', $video);
$t2 = explode('"', $t1[1]);
$image = $t2[0];
$t1 = explode('alt="', $video);
$t2 = explode('"', $t1[1]);
$title = $t2[0];
$t1=explode("<p>",$video);
$t2=explode("</p>",$t1[1]);
$descriere=$t2[0];
$t1=explode('<div class="postinfo">',$video);
$t2=explode('|',$t1[1]);
$data=trim($t2[0]);
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/locale/tvsatrm_link.php?file='.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$data.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/tv/locale/.svn/text-base/tvsatrm.php.svn-base | PHP | gpl3 | 8,233 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$html = file_get_contents($link);
$link = str_between($html, '"file": "', '"');
print $link;
?>
| 1073s | trunk/tv/locale/.svn/text-base/tvsatrm_link.php.svn-base | PHP | gpl3 | 400 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(titlu); titlu;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/locale/infotv_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>InfoTV Arad</title>
<menu>main menu</menu>
<?php
$html = file_get_contents("http://www.infotv.ro/");
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$image = "/usr/local/etc/www/cgi-bin/scripts/tv/image/infotv.gif";
$videos = explode('<li>', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$t3 = explode("/",$t2[0]);
$data=$t3[2];
$link = "http://www.infotv.ro".$t2[0];
if (strpos($link,"news") !==false) {
$t3=explode(">",$t1[1]);
$t4=explode("<",$t3[1]);
$title=trim($t4[0]);
if ($title=="") {
$title=trim(str_between($t1[1],"</strong>","</a>"));
}
$title = trim(preg_replace("/(<\/?)([^>]*>)/e","",$title));
$descriere=$title;
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/locale/infotv_link.php?file='.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$data.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
}
?>
</channel>
</rss>
| 1073s | trunk/tv/locale/.svn/text-base/infotv.php.svn-base | PHP | gpl3 | 7,137 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if( userInput == "two" || userInput == "2")
{
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + getItemInfo(getFocusItemIndex(),"download") + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>ctvmedia.ro</title>
<menu>main menu</menu>
<?php
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
}
if ($page > 1) {
$page1 = 5* ($page - 1);
$html = file_get_contents("http://www.ctvmedia.ro/index.php?limitstart=".$page1);
} else {
$page = 1;
$html = file_get_contents("http://www.ctvmedia.ro/index.php");
}
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$image = "/usr/local/etc/www/cgi-bin/scripts/tv/image/ctvmedia.jpg";
$videos = explode('<div class="contentpaneopen">', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$link = str_between($video,'value="file=','&');
$link = str_replace(" ","%20",$link);
$title = trim(str_between($video,'<h2 class="contentheading">','</h2>'));
$data = trim(str_between($video,'<span class="createdate">','</span>'));
$descriere=str_between($video,'<p style="margin-bottom: 0in;">','<div');
$descriere = preg_replace("/(<\/?)([^>]*>)/e","",$descriere);
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>playItemURL("'.$link.'", 10);</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$data.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/tv/locale/.svn/text-base/ctvmedia.php.svn-base | PHP | gpl3 | 7,537 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
$tit = urldecode($queryArr[2]);
}
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/locale/telem_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title><?php echo $tit; ?></title>
<menu>main menu</menu>
<?php
//http://www.telem.ro/telem/martor-incomod.html?start=10
if($page) {
$page1=10*($page-1);
if($search) {
$html = file_get_contents($search."?start=".$page1);
} else {
$html = file_get_contents($search."?start=".$page1);
}
} else {
$page = 1;
if($search) {
$html = file_get_contents($search);
} else {
$html = file_get_contents($search);
}
}
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
if($search) {
$url = $url.$search.",".urlencode($tit);
}
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$videos = explode('<tr class="sectiontableentry', $html);
unset($videos[0]);
$videos = array_values($videos);
$image = "http://www.telem.ro".str_between($html,'<img style="margin-right: 5px; margin-left: 10px; float: left;" src="','"');
$image="/usr/local/etc/www/cgi-bin/scripts/tv/image/telem.png";
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link = "http://www.telem.ro".$t2[0];
$t3 = explode('">', $t1[1]);
$t4 = explode('<', $t3[1]);
$title = trim($t4[0]);
$descriere=$title;
$data="";
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/locale/telem_link.php?file='.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$data.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
if($search) {
$url = $url.$search.",".urlencode($tit);
}
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/tv/locale/.svn/text-base/telem.php.svn-base | PHP | gpl3 | 8,082 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(titlu); titlu;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/locale/tvt89_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>tvt89</title>
<menu>main menu</menu>
<?php
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
}
if($page) {
$page1=10*($page-1);
if($search) {
$html = file_get_contents("http://tvt89.bridgeman.ro/video.php?start=".$page."&tip=1");
} else {
$html = file_get_contents("http://tvt89.bridgeman.ro/video.php?start=".$page."&tip=1");
}
} else {
$page = 1;
if($search) {
$html = file_get_contents("http://tvt89.bridgeman.ro/video.php?tip=1");
} else {
$html = file_get_contents("http://tvt89.bridgeman.ro/video.php?tip=1");
}
}
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$videos = explode('<td class="poza_video" valign="top">', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link = "http://tvt89.bridgeman.ro/".$t2[0];
$t1 = explode('src="', $video);
$t2 = explode('"', $t1[1]);
$image = "http://tvt89.bridgeman.ro/".$t2[0];
$title = str_between($video,'<td class="nume_emisiune">','</td>');
$descriere = str_between($video,'<td class="titlu_emisiune">','</td>');
$data = str_between($video,'<td class="data_emisiune">','</td>');
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/locale/tvt89_link.php?file='.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$data.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/tv/locale/.svn/text-base/tvt89.php.svn-base | PHP | gpl3 | 8,346 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$html = file_get_contents($link);
$link = "http://www.1tvbacau.ro/video_files/video_".str_between($html, '"vid","', '"').".flv";
print $link;
?>
| 1073s | trunk/tv/locale/.svn/text-base/1tvbacau_link.php.svn-base | PHP | gpl3 | 449 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="left" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=52 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(titlu); titlu;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/locale/1tvbacau_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>1tvbacau.ro</title>
<menu>main menu</menu>
<?php
$html = file_get_contents("http://www.1tvbacau.ro/video/");
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
function c($title) {
$title = str_replace("º","s",$title);
$title = str_replace("&Ordm;","S",$title);
$title = str_replace("þ","t",$title);
$title = str_replace("&Thorn;","T",$title);
$title = str_replace("î","i",$title);
$title = str_replace("Î","I",$title);
$title = str_replace("ã","a",$title);
$title = str_replace("Ã","I",$title);
$title = str_replace("ª","S",$title);
$title = str_replace("â","a",$title);
$title = str_replace("Â","A",$title);
return $title;
}
function getRewriteString($string) {
$string = htmlentities($string);
$string = preg_replace("/&(.)(acute|cedil|circ|ring|tilde|uml|horn);/", "$1", $string);
return $string;
}
function getRewriteString1($string) {
$string = htmlentities($string);
$string = preg_replace("/&(.)(acute|cedil|circ|ring|tilde|uml|horn|);/", "$1", $string);
return $string;
}
$videos = explode('<div class="my_wideo_other_link">', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link = htmlentities($t2[0]);
$t1=explode('src="',$video);
$t2=explode('"',$t1[1]);
$image=$t2[0];
$t3=explode(">",$t1[1]);
$t4=explode("<",$t3[1]);
$descriere=c(htmlentities($t4[0]));
$descriere=trim($descriere);
$title = trim(str_between($video,'">','</a>'));
$title = str_replace("&","&",$title);
$title = str_replace(" ","",$title);
$title = str_replace('"',"",$title);
$title = getRewriteString1($title);
$title = getRewriteString($title);
$title = str_replace("&","&",$title);
$title=c($title);
$durata="";
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/locale/1tvbacau_link.php?file='.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$durata.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
</channel>
</rss>
| 1073s | trunk/tv/locale/.svn/text-base/1tvbacau.php.svn-base | PHP | gpl3 | 8,043 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$html = file_get_contents($link);
$link = "http://tvt89.bridgeman.ro/".str_between($html,"file=","&");
$link = str_replace(' ','%20',$link);
print $link;
?>
| 1073s | trunk/tv/locale/.svn/text-base/tvt89_link.php.svn-base | PHP | gpl3 | 461 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$html = file_get_contents($link);
$t1=explode('class="flowplayer"',$html);
$t2=explode('href="',$t1[1]);
$t3=explode('"',$t2[1]);
$link="http://www.telem.ro".$t3[0];
print $link;
?>
| 1073s | trunk/tv/locale/.svn/text-base/telem_link.php.svn-base | PHP | gpl3 | 486 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if( userInput == "two" || userInput == "2")
{
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + getItemInfo(getFocusItemIndex(),"download") + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>emaramures</title>
<menu>main menu</menu>
<?php
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
}
if ($page > 1) {
$html = file_get_contents("http://www.emaramures.ro/Video-Maramures/Default.aspx?Page=".$page);
} else {
$page = 1;
$html = file_get_contents("http://www.emaramures.ro/Video-Maramures/Default.aspx");
}
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$videos = explode('div class="VideoThumbContainer">', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1=explode('title="',$video);
$t2=explode('"',$t1[1]);
$t3=explode('-',$t2[0]);
echo $t3[1];
$descriere=$t2[0];
$title=$descriere;
$t1=explode('"NewsDate">la:',$video);
$t2=explode('<',$t1[1]);
$data="Data:".$t2[0];
$t1=explode('src="',$video);
$t2=explode('"',$t1[1]);
$image=$t2[0];
$link = substr($image, 0, -8).".flv";
$link=str_replace("Thumbs","FLV",$link);
if (strpos($link,"Users/Vasile") === false) {
$link=str_replace("%20"," ",$link);
$image=str_replace("%20"," ",$image);
$descriere = preg_replace("/(<\/?)([^>]*>)/e","",$descriere);
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>playItemURL("'.$link.'", 10);</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$data.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/tv/locale/.svn/text-base/emaramures.php.svn-base | PHP | gpl3 | 7,695 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
$img = "/usr/local/etc/www/cgi-bin/scripts/tv/image/telem.png";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="50"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="50"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(annotation); annotation;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=35 widthPC=30 heightPC=30>
<?php echo $img; ?>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
location = getItemInfo(idx, "location");
annotation = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<channel>
<title>Tele'M</title>
<menu>main menu</menu>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$html = file_get_contents("http://www.telem.ro/telem/");
$html = str_between($html,'<h3>Emisiuni</h3>','</ul>');
$videos = explode('<li', $html);
unset($videos[0]);
$videos = array_values($videos);
$img = "/usr/local/etc/www/cgi-bin/scripts/tv/image/telem.png";
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link ="http://www.telem.ro".$t2[0];
$title = str_between($video,'<span>','<');
$link=$host."/scripts/tv/locale/telem.php?query=,".$link.",".urlencode($title);
echo '
<item>
<title>'.$title.'</title>
<link>'.$link.'</link>
</item>
';
}
?>
</channel>
</rss>
| 1073s | trunk/tv/locale/.svn/text-base/telem_main.php.svn-base | PHP | gpl3 | 5,127 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$html = file_get_contents($link);
$t1=explode('class="flowplayer"',$html);
$t2=explode('href="',$t1[1]);
$t3=explode('"',$t2[1]);
$link="http://www.telem.ro".$t3[0];
print $link;
?>
| 1073s | trunk/tv/locale/telem_link.php | PHP | gpl3 | 486 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$html = file_get_contents($link);
$link = "http://www.infotv.ro".str_between($html, "videoFile=", "'");
print $link;
?>
| 1073s | trunk/tv/locale/infotv_link.php | PHP | gpl3 | 424 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(titlu); titlu;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/locale/infotv_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>InfoTV Arad</title>
<menu>main menu</menu>
<?php
$html = file_get_contents("http://www.infotv.ro/");
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$image = "/usr/local/etc/www/cgi-bin/scripts/tv/image/infotv.gif";
$videos = explode('<li>', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$t3 = explode("/",$t2[0]);
$data=$t3[2];
$link = "http://www.infotv.ro".$t2[0];
if (strpos($link,"news") !==false) {
$t3=explode(">",$t1[1]);
$t4=explode("<",$t3[1]);
$title=trim($t4[0]);
if ($title=="") {
$title=trim(str_between($t1[1],"</strong>","</a>"));
}
$title = trim(preg_replace("/(<\/?)([^>]*>)/e","",$title));
$descriere=$title;
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/locale/infotv_link.php?file='.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$data.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
}
?>
</channel>
</rss>
| 1073s | trunk/tv/locale/infotv.php | PHP | gpl3 | 7,137 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$html = file_get_contents($link);
$link = str_between($html, '"file": "', '"');
print $link;
?>
| 1073s | trunk/tv/locale/tvsatrm_link.php | PHP | gpl3 | 400 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$html = file_get_contents($link);
$link = "http://www.1tvbacau.ro/video_files/video_".str_between($html, '"vid","', '"').".flv";
print $link;
?>
| 1073s | trunk/tv/locale/1tvbacau_link.php | PHP | gpl3 | 449 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(titlu); titlu;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/locale/tvt89_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>tvt89</title>
<menu>main menu</menu>
<?php
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
}
if($page) {
$page1=10*($page-1);
if($search) {
$html = file_get_contents("http://tvt89.bridgeman.ro/video.php?start=".$page."&tip=1");
} else {
$html = file_get_contents("http://tvt89.bridgeman.ro/video.php?start=".$page."&tip=1");
}
} else {
$page = 1;
if($search) {
$html = file_get_contents("http://tvt89.bridgeman.ro/video.php?tip=1");
} else {
$html = file_get_contents("http://tvt89.bridgeman.ro/video.php?tip=1");
}
}
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$videos = explode('<td class="poza_video" valign="top">', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link = "http://tvt89.bridgeman.ro/".$t2[0];
$t1 = explode('src="', $video);
$t2 = explode('"', $t1[1]);
$image = "http://tvt89.bridgeman.ro/".$t2[0];
$title = str_between($video,'<td class="nume_emisiune">','</td>');
$descriere = str_between($video,'<td class="titlu_emisiune">','</td>');
$data = str_between($video,'<td class="data_emisiune">','</td>');
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/locale/tvt89_link.php?file='.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$data.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
if($search) {
$url = $url.$search;
}
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/tv/locale/tvt89.php | PHP | gpl3 | 8,346 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$html = file_get_contents($link);
$link = "http://tvt89.bridgeman.ro/".str_between($html,"file=","&");
$link = str_replace(' ','%20',$link);
print $link;
?>
| 1073s | trunk/tv/locale/tvt89_link.php | PHP | gpl3 | 461 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
$img = "/usr/local/etc/www/cgi-bin/scripts/tv/image/bing.jpg";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="50"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="50"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(annotation); annotation;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=35 widthPC=30 heightPC=30>
<?php echo $img; ?>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
location = getItemInfo(idx, "location");
annotation = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<channel>
<title>Bing</title>
<item>
<title>FOX Soccer Channel</title>
<link><?php echo $host; ?>/scripts/tv/php/bing1.php</link>
<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/bing.jpg" />
</item>
<item>
<title>NBA</title>
<link><?php echo $host; ?>/scripts/tv/php/bing.php?file=http://www.bing.com/videos/browse/sports/nba?q=browse:sports/nba,NBA</link>
<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/bing.jpg" />
</item>
<item>
<title>MLB</title>
<link><?php echo $host; ?>/scripts/tv/php/bing.php?file=http://www.bing.com/videos/browse/sports/mlb?q=browse:sports/mlb,MLB</link>
<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/bing.jpg" />
</item>
<item>
<title>NHL</title>
<link><?php echo $host; ?>/scripts/tv/php/bing.php?file=http://www.bing.com/videos/browse/sports/nhl?q=browse:sports/nhl,NHL</link>
<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/bing.jpg" />
</item>
<item>
<title>NFL</title>
<link><?php echo $host; ?>/scripts/tv/php/bing.php?file=http://www.bing.com/videos/browse/sports/nfl?q=browse:sports/nfl,NFL</link>
<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/bing.jpg" />
</item>
<item>
<title>College Football</title>
<link><?php echo $host; ?>/scripts/tv/php/bing.php?file=http://www.bing.com/videos/browse/sports/college-football?q=browse:sports/college-football,College+football</link>
<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/bing.jpg" />
</item>
<item>
<title>
College Basketball</title>
<link><?php echo $host; ?>/scripts/tv/php/bing.php?file=http://www.bing.com/videos/browse/sports/college-basketball?q=browse:sports/college-basketball,College+basketball</link>
<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/bing.jpg" />
</item>
</channel>
</rss>
| 1073s | trunk/tv/bing_sport.php | PHP | gpl3 | 5,996 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/sport/dinamo_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>Dinamo Bucureşti</title>
<menu>main menu</menu>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$host = "http://127.0.0.1/cgi-bin";
$html = file_get_contents("http://www.fcdinamo.ro/web/guest/galerii-video");
$videos = explode('td class="imagine_single"', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link = urlencode(trim($t2[0]));
$t1 = explode('src="', $video);
$t2 = explode('"', $t1[1]);
$image = "http://www.fcdinamo.ro".$t2[0];
$t1 = explode('alt="', $video);
$t2 = explode('"', $t1[1]);
$title = $t2[0];
$descriere=$title;
$durata="";
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/sport/dinamo_link.php?file='.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$durata.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
</channel>
</rss>
| 1073s | trunk/tv/sport/dinamo.php | PHP | gpl3 | 6,794 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
function str_prep($string){
$string = str_replace(' ','%20',$string);
$string = str_replace('[','%5B',$string);
$string = str_replace(']','%5D',$string);
$string = str_replace('%3A',':',$string);
$string = str_replace('%2F','/',$string);
$string = str_replace('#038;','',$string);
$string = str_replace('&','&',$string);
return $string;
}
function youtube($file) {
if(preg_match('/youtube\.com\/(v\/|watch\?v=|embed\/)([\w\-]+)/', $file, $match)) {;
$l ="http://www.youtube.com/watch?v=".$match[2];
$r=file_get_contents("http://127.0.0.1/cgi-bin/scripts/util/yt.php?file=".$l);
}
return $r;
}
$l = $_GET["file"];
$l=urldecode($l);
$l=str_prep($l);
$html = file_get_contents($l);
if(preg_match_all("/(http\b.*?)(\"|\')+/i",$html,$matches)) {
$links=$matches[1];
}
$s="/youtube\.c|videa\.hu\/flvplayer|kiwi\.kz|sapo\.pt|dailymotion|dai\.ly|sporxtv\.com/i";
for ($i=0;$i<count($links);$i++) {
$cur_link=$links[$i];
if (preg_match($s,$cur_link)) {
if (strpos($cur_link, 'youtube.com/watch') !== false){
//echo $cur_link;
$link=youtube($cur_link);
} elseif (strpos($cur_link,'kiwi.kz') !==false){
$file = get_headers($cur_link);
foreach ($file as $key => $value) {
if (strstr($value,"Location")) {
$link = urldecode(ltrim($value,"Location:"));
$link = str_between($link,"file=","&");
} // end if
} // end foreach
} elseif (strpos($cur_link,'videa.hu') !==false){
preg_match('/(v=)([A-Za-z0-9_]+)/', $cur_link, $m);
$id=$m[2];
if ($id <> "") {
$cur_link="http://videa.hu/videok/sport/".$id;
$html = file_get_contents($cur_link);
$id=str_between($html,"flvplayer.swf?f=",".0&");
$link="http://videa.hu/static/video/".$id;
} else {
$html = file_get_contents($cur_link);
$id=str_between($html,"flvplayer.swf?f=",".0&");
$link="http://videa.hu/static/video/".$id;
}
} elseif (strpos($cur_link,'videos.sapo.pt') !==false){
$v_id = substr(strrchr($cur_link, "/"), 1);
$link = "http://rd3.videos.sapo.pt/".$v_id."/mov/1" ;
} elseif (strpos($cur_link,'sporxtv.com') !==false) {
$html = file_get_contents($cur_link);
$link = str_between($html,"file: '","'");
} elseif ((strpos($cur_link, "dailymotion") !== false) || (strpos($cur_link, "dai.ly") !== false)){
$html = file_get_contents($cur_link);
$t1 = explode('sdURL', $html);
$sd=urldecode($t1[1]);
$t1=explode('"',$sd);
$sd=$t1[2];
$sd=str_replace("\\","",$sd);
$n=explode("?",$sd);
$nameSD=$n[0];
$nameSD=substr(strrchr($nameSD,"/"),1);
$t1 = explode('hqURL', $html);
$hd=urldecode($t1[1]);
$t1=explode('"',$hd);
$hd=$t1[2];
$hd=str_replace("\\","",$hd);
$n=explode("?",$hd);
$nameHD=$n[0];
$nameHD=substr(strrchr($nameHD,"/"),1);
if ($hd <> "") {
$link = $hd;
}
if (($sd <> "") && ($hd=="")) {
$link = $sd;
}
}
}
}
print $link;
?>
| 1073s | trunk/tv/sport/footytube_link.php | PHP | gpl3 | 3,260 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="50"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="50"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(annotation); annotation;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=35 widthPC=30 heightPC=30>
/usr/local/etc/www/cgi-bin/scripts/tv/image/digi.png
</image>
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
location = getItemInfo(idx, "location");
annotation = getItemInfo(idx, "annotation");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<channel>
<title>Video - Digi Sport</title>
<menu>main menu</menu>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$html = file_get_contents("http://www.digisport.ro/video");
$t1=explode('<ul class="video-cats">',$html);
$t2=explode('</div>',$t1[1]);
$html=$t2[0];
$videos = explode('<li', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link = $t2[0];
$t3 = explode('">', $t1[1]);
$t4 = explode('<', $t3[1]);
$title = trim($t4[0]);
$link1 = $host."/scripts/tv/sport/digi.php?query=1,".$link.",".urlencode($title);
if ($title <> "") {
echo '
<item>
<title>'.$title.'</title>
<link>'.$link1.'</link>
<annotation>'.$title.'</annotation>
<mediaDisplay name="threePartsView"/>
</item>
';
}
}
?>
</channel>
</rss>
| 1073s | trunk/tv/sport/digi_main.php | PHP | gpl3 | 5,319 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/sport/liga2_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>liga2.ro</title>
<menu>main menu</menu>
<?php
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = $queryArr[1];
}
if($page) {
$html = file_get_contents("http://www.liga2.ro/multimedia-video?p=".$page."");
}
else {
$page = 1;
$html = file_get_contents("http://www.liga2.ro/multimedia-video");
}
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",";
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina anterioara</annotation>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$videos = explode('<div class="news_list">', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('<a href="', $video);
$t2 = explode('"', $t1[1]);
$link = "http://www.liga2.ro".$t2[0];
$t1 = explode('src="', $video);
$t2 = explode('?', $t1[1]);
$image = $t2[0];
$title = str_between($video,'<span>','<');
$title = trim($title);
$descriere=$title;
$durata="";
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/sport/liga2_link.php?file='.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$durata.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",";
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Pagina urmatoare</annotation>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/tv/sport/liga2.php | PHP | gpl3 | 7,611 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$link=urldecode($link);
//$html = file_get_contents($link);
if (strpos($link, "youtube") !== false) {
$link=file_get_contents("http://127.0.0.1/cgi-bin/scripts/util/yt.php?file=".$link);
print $link;
}
if (strpos($link, "sapo.pt") !== false) {
$v_id = substr(strrchr($link, "/"), 1);
$link = "http://rd3.videos.sapo.pt/".$v_id."/mov/1" ;
print $link;
}
if ((strpos($link, "dailymotion") !== false) || (strpos($link, "dai.ly") !== false)){
$html = file_get_contents($link);
$t1 = explode('sdURL', $html);
$sd=urldecode($t1[1]);
$t1=explode('"',$sd);
$sd=$t1[2];
$sd=str_replace("\\","",$sd);
$n=explode("?",$sd);
$nameSD=$n[0];
$nameSD=substr(strrchr($nameSD,"/"),1);
$t1 = explode('hqURL', $html);
$hd=urldecode($t1[1]);
$t1=explode('"',$hd);
$hd=$t1[2];
$hd=str_replace("\\","",$hd);
$n=explode("?",$hd);
$nameHD=$n[0];
$nameHD=substr(strrchr($nameHD,"/"),1);
if ($hd <> "") {
print $hd;
}
if (($sd <> "") && ($hd=="")) {
print $sd;
}
}
if (strpos($link, "vids.myspace.com") !== false) {
$suf1 = "/vid.mp4";
$suf2 = "/vid.flv";
$h1 = file_get_contents($link);
$link = str_between($h1,'<link rel="image_src" href="','"');
$link = str_replace('thumb1_','',$link);
$link = str_replace('thumb2_','',$link);
$link = str_replace('.jpg','',$link);
$part = substr($link,34);
$link = "http://l3-hl1.videos02.myspacecdn.com".$part.$suf1; //mp4
$AgetHeaders = @get_headers($link);
if (!preg_match("|200|", $AgetHeaders[0])) {
$link = "http://l3-hl1.videos02.myspacecdn.com".$part.$suf2; //flv
$AgetHeaders = @get_headers($link);
if (!preg_match("|200|", $AgetHeaders[0])) {
$link = "http://l3-hl1xl.myspacecdn.cust.footprint.net".$part.$suf1; //mp4
$AgetHeaders = @get_headers($link);
if (!preg_match("|200|", $AgetHeaders[0])) {
$link = "http://l3-hl1xl.myspacecdn.cust.footprint.net".$part.$suf2; //flv
$AgetHeaders = @get_headers($link);
if (!preg_match("|200|", $AgetHeaders[0])) {
$link = "";
}
}
}
}
print $link;
}
if (strpos($link, "svtplay.se") !== false) {
$html = file_get_contents($link);
$link = str_between($html,'pathflv=','&');
print $link;
}
if (strpos($link,'videa.hu') !==false){
preg_match('/(v=)([A-Za-z0-9_]+)/', $link, $m);
$id=$m[2];
if ($id <> "") {
$cur_link="http://videa.hu/videok/sport/".$id;
$html = file_get_contents($cur_link);
$id=str_between($html,"flvplayer.swf?f=",".0&");
$link1="http://videa.hu/static/video/".$id;
} else {
$html = file_get_contents($link);
$id=str_between($html,"flvplayer.swf?f=",".0&");
$link1="http://videa.hu/static/video/".$id;
}
print $link1;
}
if (strpos($link,'sporxtv.com') !==false) {
$html = file_get_contents($link);
$link = str_between($html,"file: '","'");
print $link;
}
if (strpos($link,'rutube') !==false) {
$link="http://127.0.0.1/cgi-bin/translate?stream,,".$link;
print $link;
}
?>
| 1073s | trunk/tv/sport/sportgioco_link.php | PHP | gpl3 | 3,295 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=30
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(titlu_link); titlu_link;</script>
</text>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
titlu_link=getItemInfo(idx,"download");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/sport/sportgioco_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>www.sportgioco.it</title>
<menu>main menu</menu>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$html = file_get_contents("http://www.sportgioco.it/calcio/highlights.php");
$image = "/usr/local/etc/www/cgi-bin/scripts/tv/image/sportgioco.jpg";
$videos = explode('<tr>', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link = $t2[0];
$durata = str_between($video,'<td class="tdLight3" style="text-align:center" width="15%">','</td>');
if ($durata == "") {
$durata = str_between($video,'<td class="tdDark3" style="text-align:center" width="15%">','</td>');
}
$title = str_between($video,'target="_blank">','<');
$descriere=$title;
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
if (!preg_match("/rutube/",$link)) {
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/sport/sportgioco_link.php?file='.urlencode($link).'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$durata.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
}
?>
</channel>
</rss>
| 1073s | trunk/tv/sport/sportgioco.php | PHP | gpl3 | 7,212 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$html = file_get_contents($link);
$link = urldecode(str_between($html, '"flashvars" value="file=', '&'));
print $link;
?>
| 1073s | trunk/tv/sport/digi_link.php | PHP | gpl3 | 426 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$link = urldecode($link);
$html = file_get_contents($link);
$link = str_between($html,'"file=','"');
print $link;
?>
| 1073s | trunk/tv/sport/dinamo_link.php | PHP | gpl3 | 421 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$html = file_get_contents($link);
$link = str_between($html, "loadFLV ('articleMainVideoPlayer', '", "'");
print $link;
?>
| 1073s | trunk/tv/sport/liga2_link.php | PHP | gpl3 | 427 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=30
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(titlu_link); titlu_link;</script>
</text>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
titlu_link=getItemInfo(idx,"download");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/sport/sportgioco_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>www.sportgioco.it</title>
<menu>main menu</menu>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$html = file_get_contents("http://www.sportgioco.it/calcio/highlights.php");
$image = "/usr/local/etc/www/cgi-bin/scripts/tv/image/sportgioco.jpg";
$videos = explode('<tr>', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link = $t2[0];
$durata = str_between($video,'<td class="tdLight3" style="text-align:center" width="15%">','</td>');
if ($durata == "") {
$durata = str_between($video,'<td class="tdDark3" style="text-align:center" width="15%">','</td>');
}
$title = str_between($video,'target="_blank">','<');
$descriere=$title;
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
if (!preg_match("/rutube/",$link)) {
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/sport/sportgioco_link.php?file='.urlencode($link).'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$durata.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
}
?>
</channel>
</rss>
| 1073s | trunk/tv/sport/.svn/text-base/sportgioco.php.svn-base | PHP | gpl3 | 7,212 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
$query = $_GET["query"];
if($query) {
$queryArr = explode(',', $query);
$page = $queryArr[0];
$search = urldecode($queryArr[1]);
$tit = urldecode($queryArr[2]);
}
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
storagePath = getStoragePath("tmp");
storagePath_stream = storagePath + "stream.dat";
storagePath_playlist = storagePath + "playlist.dat";
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
popupXPC = "40"
popupYPC = "55"
popupWidthPC = "22.3"
popupHeightPC = "5.5"
popupFontSize = "13"
popupBorderColor="28:35:51"
popupForegroundColor="255:255:255"
popupBackgroundColor="28:35:51"
idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=30
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(data); data;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
data = getItemInfo(idx, "data");
annotation = getItemInfo(idx, "annotation");
img = getItemInfo(idx,"image");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if( userInput == "two")
{
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + getItemInfo(getFocusItemIndex(),"download") + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title><?php echo $tit; ?></title>
<menu>main menu</menu>
<?php
//http://www.soccerclips.net/videos/latest_goals/2
$link=$search.$page;
$html = file_get_contents($link);
if($page > 1) { ?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page-1).",".urlencode($search).",".urlencode($tit);
?>
<title>Previous Page</title>
<link><?php echo $url;?></link>
<annotation>Previous Page</annotation>
<image>image/left.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
<?php } ?>
<?php
$videos = explode('<div class="idx_th">', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"',$t1[1]);
$link = "http://www.soccerclips.net".$t2[0];
$t3=explode(">",$t1[2]);
$t4=explode("<",$t3[1]);
$title=$t4[0];
$t5=explode('title="',$t1[2]);
$t6=explode('"',$t5[1]);
$annotation=$t6[0];
$t1 = explode('src="', $video);
$t2 = explode('"', $t1[1]);
$image = $t2[0];
$t1=explode('<div class="idx_a">',$video);
$t2=explode('<',$t1[1]);
$data=$t2[0];
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
$link = 'http://127.0.0.1/cgi-bin/scripts/tv/sport/soccerclips_link.php?file='.$link;
echo'
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$link.'";
movie=getUrl(url);
cancelIdle();
streamArray = null;
streamArray = pushBackStringArray(streamArray, "");
streamArray = pushBackStringArray(streamArray, "");
streamArray = pushBackStringArray(streamArray, movie);
streamArray = pushBackStringArray(streamArray, movie);
streamArray = pushBackStringArray(streamArray, video/x-flv);
streamArray = pushBackStringArray(streamArray, "'.$title.'");
streamArray = pushBackStringArray(streamArray, "1");
writeStringToFile(storagePath_stream, streamArray);
doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer.rss");
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$annotation.'</annotation>
<data>'.$data.'</data>
<image>'.$image.'</image>
<media:thumbnail url="'.$image.'" />
<mediaDisplay name="threePartsView"/>
</item>
';
}
?>
<item>
<?php
$sThisFile = 'http://127.0.0.1'.$_SERVER['SCRIPT_NAME'];
$url = $sThisFile."?query=".($page+1).",".urlencode($search).",".urlencode($tit);
?>
<title>Next Page</title>
<link><?php echo $url;?></link>
<annotation>Next Page</annotation>
<image>image/right.jpg</image>
<mediaDisplay name="threePartsView"/>
</item>
</channel>
</rss>
| 1073s | trunk/tv/sport/.svn/text-base/soccerclips.php.svn-base | PHP | gpl3 | 8,338 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
function str_prep($string){
$string = str_replace(' ','%20',$string);
$string = str_replace('[','%5B',$string);
$string = str_replace(']','%5D',$string);
$string = str_replace('%3A',':',$string);
$string = str_replace('%2F','/',$string);
$string = str_replace('#038;','',$string);
$string = str_replace('&','&',$string);
return $string;
}
function youtube($file) {
if(preg_match('/youtube\.com\/(v\/|watch\?v=|embed\/)([\w\-]+)/', $file, $match)) {;
$l ="http://www.youtube.com/watch?v=".$match[2];
$r=file_get_contents("http://127.0.0.1/cgi-bin/scripts/util/yt.php?file=".$l);
}
return $r;
}
$l = $_GET["file"];
$l=urldecode($l);
$l=str_prep($l);
$html = file_get_contents($l);
if(preg_match_all("/(http\b.*?)(\"|\')+/i",$html,$matches)) {
$links=$matches[1];
}
$s="/youtube\.c|videa\.hu\/flvplayer|kiwi\.kz|sapo\.pt|dailymotion|dai\.ly|sporxtv\.com/i";
for ($i=0;$i<count($links);$i++) {
$cur_link=$links[$i];
if (preg_match($s,$cur_link)) {
if (strpos($cur_link, 'youtube.com/watch') !== false){
//echo $cur_link;
$link=youtube($cur_link);
} elseif (strpos($cur_link,'kiwi.kz') !==false){
$file = get_headers($cur_link);
foreach ($file as $key => $value) {
if (strstr($value,"Location")) {
$link = urldecode(ltrim($value,"Location:"));
$link = str_between($link,"file=","&");
} // end if
} // end foreach
} elseif (strpos($cur_link,'videa.hu') !==false){
preg_match('/(v=)([A-Za-z0-9_]+)/', $cur_link, $m);
$id=$m[2];
if ($id <> "") {
$cur_link="http://videa.hu/videok/sport/".$id;
$html = file_get_contents($cur_link);
$id=str_between($html,"flvplayer.swf?f=",".0&");
$link="http://videa.hu/static/video/".$id;
} else {
$html = file_get_contents($cur_link);
$id=str_between($html,"flvplayer.swf?f=",".0&");
$link="http://videa.hu/static/video/".$id;
}
} elseif (strpos($cur_link,'videos.sapo.pt') !==false){
$v_id = substr(strrchr($cur_link, "/"), 1);
$link = "http://rd3.videos.sapo.pt/".$v_id."/mov/1" ;
} elseif (strpos($cur_link,'sporxtv.com') !==false) {
$html = file_get_contents($cur_link);
$link = str_between($html,"file: '","'");
} elseif ((strpos($cur_link, "dailymotion") !== false) || (strpos($cur_link, "dai.ly") !== false)){
$html = file_get_contents($cur_link);
$t1 = explode('sdURL', $html);
$sd=urldecode($t1[1]);
$t1=explode('"',$sd);
$sd=$t1[2];
$sd=str_replace("\\","",$sd);
$n=explode("?",$sd);
$nameSD=$n[0];
$nameSD=substr(strrchr($nameSD,"/"),1);
$t1 = explode('hqURL', $html);
$hd=urldecode($t1[1]);
$t1=explode('"',$hd);
$hd=$t1[2];
$hd=str_replace("\\","",$hd);
$n=explode("?",$hd);
$nameHD=$n[0];
$nameHD=substr(strrchr($nameHD,"/"),1);
if ($hd <> "") {
$link = $hd;
}
if (($sd <> "") && ($hd=="")) {
$link = $sd;
}
}
}
}
print $link;
?>
| 1073s | trunk/tv/sport/.svn/text-base/footytube_link.php.svn-base | PHP | gpl3 | 3,260 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
$host = "http://127.0.0.1/cgi-bin";
?>
<rss version="2.0">
<onEnter>
startitem = "middle";
setRefreshTime(1);
</onEnter>
<onRefresh>
setRefreshTime(-1);
itemCount = getPageInfo("itemCount");
</onRefresh>
<mediaDisplay name="threePartsView"
sideLeftWidthPC="0"
sideRightWidthPC="0"
headerImageWidthPC="0"
selectMenuOnRight="no"
autoSelectMenu="no"
autoSelectItem="no"
itemImageHeightPC="0"
itemImageWidthPC="0"
itemXPC="8"
itemYPC="25"
itemWidthPC="45"
itemHeightPC="8"
capXPC="8"
capYPC="25"
capWidthPC="45"
capHeightPC="64"
itemBackgroundColor="0:0:0"
itemPerPage="8"
itemGap="0"
bottomYPC="90"
backgroundColor="0:0:0"
showHeader="no"
showDefaultInfo="no"
imageFocus=""
sliding="no"
>
<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>getPageInfo("pageTitle");</script>
</text>
<text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
Apasati 2 pentru download, 3 pentru download manager
</text>
<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
<script>sprintf("%s / ", focus-(-1))+itemCount;</script>
</text>
<text align="center" redraw="yes"
lines="8" fontSize=17
offsetXPC=55 offsetYPC=58 widthPC=40 heightPC=38
backgroundColor=0:0:0 foregroundColor=200:200:200>
<script>print(annotation); annotation;</script>
</text>
<text redraw="yes" align="center" offsetXPC="60" offsetYPC="52" widthPC="30" heightPC="5" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
<script>print(durata); durata;</script>
</text>
<image redraw="yes" offsetXPC=60 offsetYPC=25 widthPC=30 heightPC=25>
<script>print(img); img;</script>
</image>
<idleImage> image/POPUP_LOADING_01.png </idleImage>
<idleImage> image/POPUP_LOADING_02.png </idleImage>
<idleImage> image/POPUP_LOADING_03.png </idleImage>
<idleImage> image/POPUP_LOADING_04.png </idleImage>
<idleImage> image/POPUP_LOADING_05.png </idleImage>
<idleImage> image/POPUP_LOADING_06.png </idleImage>
<idleImage> image/POPUP_LOADING_07.png </idleImage>
<idleImage> image/POPUP_LOADING_08.png </idleImage>
<itemDisplay>
<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx)
{
img = getItemInfo(idx,"image");
annotation = getItemInfo(idx, "annotation");
durata = getItemInfo(idx, "durata");
pub = getItemInfo(idx, "pub");
titlu = getItemInfo(idx, "title");
}
getItemInfo(idx, "title");
</script>
<fontSize>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "16"; else "14";
</script>
</fontSize>
<backgroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "10:80:120"; else "-1:-1:-1";
</script>
</backgroundColor>
<foregroundColor>
<script>
idx = getQueryItemIndex();
focus = getFocusItemIndex();
if(focus==idx) "255:255:255"; else "140:140:140";
</script>
</foregroundColor>
</text>
</itemDisplay>
<onUserInput>
<script>
ret = "false";
userInput = currentUserInput();
if (userInput == "pagedown" || userInput == "pageup")
{
idx = Integer(getFocusItemIndex());
if (userInput == "pagedown")
{
idx -= -8;
if(idx >= itemCount)
idx = itemCount-1;
}
else
{
idx -= 8;
if(idx < 0)
idx = 0;
}
print("new idx: "+idx);
setFocusItemIndex(idx);
setItemFocus(0);
redrawDisplay();
"true";
}
if (userInput == "two" || userInput == "2")
{
showIdle();
url="<?php echo $host; ?>" + "/scripts/tv/sport/dinamo_link.php?file=" + getItemInfo(getFocusItemIndex(),"download");
movie=getUrl(url);
cancelIdle();
topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
dlok = loadXMLFile(topUrl);
"true";
}
if (userInput == "three" || userInput == "3")
{
jumpToLink("destination");
"true";
}
ret;
</script>
</onUserInput>
</mediaDisplay>
<item_template>
<mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
<idleImage>image/POPUP_LOADING_01.png</idleImage>
<idleImage>image/POPUP_LOADING_02.png</idleImage>
<idleImage>image/POPUP_LOADING_03.png</idleImage>
<idleImage>image/POPUP_LOADING_04.png</idleImage>
<idleImage>image/POPUP_LOADING_05.png</idleImage>
<idleImage>image/POPUP_LOADING_06.png</idleImage>
<idleImage>image/POPUP_LOADING_07.png</idleImage>
<idleImage>image/POPUP_LOADING_08.png</idleImage>
</mediaDisplay>
</item_template>
<destination>
<link>http://127.0.0.1/cgi-bin/scripts/util/level.php
</link>
</destination>
<channel>
<title>Dinamo Bucureşti</title>
<menu>main menu</menu>
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$host = "http://127.0.0.1/cgi-bin";
$html = file_get_contents("http://www.fcdinamo.ro/web/guest/galerii-video");
$videos = explode('td class="imagine_single"', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('href="', $video);
$t2 = explode('"', $t1[1]);
$link = urlencode(trim($t2[0]));
$t1 = explode('src="', $video);
$t2 = explode('"', $t1[1]);
$image = "http://www.fcdinamo.ro".$t2[0];
$t1 = explode('alt="', $video);
$t2 = explode('"', $t1[1]);
$title = $t2[0];
$descriere=$title;
$durata="";
$name = preg_replace('/[^A-Za-z0-9_]/','_',$title).".flv";
echo '
<item>
<title>'.$title.'</title>
<onClick>
<script>
showIdle();
url="'.$host.'/scripts/tv/sport/dinamo_link.php?file='.$link.'";
movie=getUrl(url);
cancelIdle();
playItemUrl(movie,10);
</script>
</onClick>
<download>'.$link.'</download>
<name>'.$name.'</name>
<annotation>'.$descriere.'</annotation>
<image>'.$image.'</image>
<durata>'.$durata.'</durata>
<media:thumbnail url="'.$image.'" />
</item>
';
}
?>
</channel>
</rss>
| 1073s | trunk/tv/sport/.svn/text-base/dinamo.php.svn-base | PHP | gpl3 | 6,794 |
#!/usr/local/bin/Resource/www/cgi-bin/php
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$link = $_GET["file"];
$html = file_get_contents($link);
$link = urldecode(str_between($html, '"flashvars" value="file=', '&'));
print $link;
?>
| 1073s | trunk/tv/sport/.svn/text-base/digi_link.php.svn-base | PHP | gpl3 | 426 |