parent
2f37be15fb
commit
5a96b679e3
30 changed files with 8258 additions and 1 deletions
@ -0,0 +1,60 @@ |
||||
-----BEGIN CERTIFICATE----- |
||||
MIIFjjCCBHagAwIBAgIQDaHxqyhdL4ijoZIqePucfTANBgkqhkiG9w0BAQsFADBy |
||||
MQswCQYDVQQGEwJDTjElMCMGA1UEChMcVHJ1c3RBc2lhIFRlY2hub2xvZ2llcywg |
||||
SW5jLjEdMBsGA1UECxMURG9tYWluIFZhbGlkYXRlZCBTU0wxHTAbBgNVBAMTFFRy |
||||
dXN0QXNpYSBUTFMgUlNBIENBMB4XDTE4MTAwNDAwMDAwMFoXDTE5MTAwNDEyMDAw |
||||
MFowGzEZMBcGA1UEAxMQdmlkZW8ueWltaWFuLnh5ejCCASIwDQYJKoZIhvcNAQEB |
||||
BQADggEPADCCAQoCggEBANrCX4A1t3TrQ0EMyuEbXotrfwIIK7EfEd3vGmeWdhV4 |
||||
kK/AkqiY+gb9o9FIlJ08V1/JPfjArU+NmSjCX5yHk08/qt9SNI72F9vhndlJybBT |
||||
VERGEC6a9IN773MRsqSkiFdeM9NfntSzyh+FUZGkXDjwamS0/C02uYn+TTyeVmY2 |
||||
vb95ZNGAtliKMKZTnRgHIldsbO8eGfE7sTWqYfo8/4Jf/sBGV0XN8u4la6W/dJky |
||||
LYLKkKq7U4XyKfECvhICa8F6Wziv21JZOjJV0usXhH3+/DzpBd3pL12noMU3mdr2 |
||||
A8io3lAA1Pz4OSN2sW7T68TqlDfsijra5er12yamjYECAwEAAaOCAnUwggJxMB8G |
||||
A1UdIwQYMBaAFH/TmfOgRw4xAFZWIo63zJ7dygGKMB0GA1UdDgQWBBT652Xs5LNi |
||||
l9Ek7FxjXpuvXoHAvTAbBgNVHREEFDASghB2aWRlby55aW1pYW4ueHl6MA4GA1Ud |
||||
DwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwTAYDVR0g |
||||
BEUwQzA3BglghkgBhv1sAQIwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGln |
||||
aWNlcnQuY29tL0NQUzAIBgZngQwBAgEwgYEGCCsGAQUFBwEBBHUwczAlBggrBgEF |
||||
BQcwAYYZaHR0cDovL29jc3AyLmRpZ2ljZXJ0LmNvbTBKBggrBgEFBQcwAoY+aHR0 |
||||
cDovL2NhY2VydHMuZGlnaXRhbGNlcnR2YWxpZGF0aW9uLmNvbS9UcnVzdEFzaWFU |
||||
TFNSU0FDQS5jcnQwCQYDVR0TBAIwADCCAQQGCisGAQQB1nkCBAIEgfUEgfIA8AB2 |
||||
AKS5CZC0GFgUh7sTosxncAo8NZgE+RvfuON3zQ7IDdwQAAABZj+YZVcAAAQDAEcw |
||||
RQIgNpZHln7f/YhcmfK7pf7KAUuOi9596moal5fBBVpkbxUCIQDpLtDwHzLBB/ef |
||||
jeEyFzODz4xLP2EUIWRQXdN8x2gWKwB2AId1v+dZfPiMQ5lfvfNu/1aNR1Y2/0q1 |
||||
YMG06v9eoIMPAAABZj+YZjIAAAQDAEcwRQIgQZat4+9jbulWzIfx1sZSP8qay6ZQ |
||||
NL8iLwyx6CnTwIsCIQCIZ8r6J9hOTvR76AdDcWH+l5HqIahabwRXACFS0MWixTAN |
||||
BgkqhkiG9w0BAQsFAAOCAQEAaHctLQ7Vyaad+L4hWQkrexuqgOebftOO4faRcixz |
||||
lCO55Ko4qpyUtxtJ66mjAKWQlQno643hVq3J1Ggtus76mANw+j8goTZ0f5611dTY |
||||
HKXUHSC8ThbG/XTPMdI/lyS5AuvPluHxHdk8I3uiCOIud+68s1O2V5YyFofAE3DW |
||||
pLPbMp3MxTUMqqX8tkOuWjxBxQtp2fmK0fk8wp9zvXicf4SEv5AuokXo2n1+WaGg |
||||
XcaiiRq9mcQgVzSrmqtW9Snd29cXwEDYn4Qer/r1+fePd8iuKIf5kbW+kieE5EII |
||||
Z52ClzKeYriOn0aEzl8VQQktX4TmZGL3ggD0O0IHQVBplg== |
||||
-----END CERTIFICATE----- |
||||
-----BEGIN CERTIFICATE----- |
||||
MIIErjCCA5agAwIBAgIQBYAmfwbylVM0jhwYWl7uLjANBgkqhkiG9w0BAQsFADBh |
||||
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 |
||||
d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD |
||||
QTAeFw0xNzEyMDgxMjI4MjZaFw0yNzEyMDgxMjI4MjZaMHIxCzAJBgNVBAYTAkNO |
||||
MSUwIwYDVQQKExxUcnVzdEFzaWEgVGVjaG5vbG9naWVzLCBJbmMuMR0wGwYDVQQL |
||||
ExREb21haW4gVmFsaWRhdGVkIFNTTDEdMBsGA1UEAxMUVHJ1c3RBc2lhIFRMUyBS |
||||
U0EgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCgWa9X+ph+wAm8 |
||||
Yh1Fk1MjKbQ5QwBOOKVaZR/OfCh+F6f93u7vZHGcUU/lvVGgUQnbzJhR1UV2epJa |
||||
e+m7cxnXIKdD0/VS9btAgwJszGFvwoqXeaCqFoP71wPmXjjUwLT70+qvX4hdyYfO |
||||
JcjeTz5QKtg8zQwxaK9x4JT9CoOmoVdVhEBAiD3DwR5fFgOHDwwGxdJWVBvktnoA |
||||
zjdTLXDdbSVC5jZ0u8oq9BiTDv7jAlsB5F8aZgvSZDOQeFrwaOTbKWSEInEhnchK |
||||
ZTD1dz6aBlk1xGEI5PZWAnVAba/ofH33ktymaTDsE6xRDnW97pDkimCRak6CEbfe |
||||
3dXw6OV5AgMBAAGjggFPMIIBSzAdBgNVHQ4EFgQUf9OZ86BHDjEAVlYijrfMnt3K |
||||
AYowHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDgYDVR0PAQH/BAQD |
||||
AgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAG |
||||
AQH/AgEAMDQGCCsGAQUFBwEBBCgwJjAkBggrBgEFBQcwAYYYaHR0cDovL29jc3Au |
||||
ZGlnaWNlcnQuY29tMEIGA1UdHwQ7MDkwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj |
||||
ZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwTAYDVR0gBEUwQzA3Bglg |
||||
hkgBhv1sAQIwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29t |
||||
L0NQUzAIBgZngQwBAgEwDQYJKoZIhvcNAQELBQADggEBAK3dVOj5dlv4MzK2i233 |
||||
lDYvyJ3slFY2X2HKTYGte8nbK6i5/fsDImMYihAkp6VaNY/en8WZ5qcrQPVLuJrJ |
||||
DSXT04NnMeZOQDUoj/NHAmdfCBB/h1bZ5OGK6Sf1h5Yx/5wR4f3TUoPgGlnU7EuP |
||||
ISLNdMRiDrXntcImDAiRvkh5GJuH4YCVE6XEntqaNIgGkRwxKSgnU3Id3iuFbW9F |
||||
UQ9Qqtb1GX91AJ7i4153TikGgYCdwYkBURD8gSVe8OAco6IfZOYt/TEwii1Ivi1C |
||||
qnuUlWpsF1LdQNIdfbW3TSe0BhQa7ifbVIfvPWHYOu3rkg1ZeMo6XRU9B4n5VyJY |
||||
RmE= |
||||
-----END CERTIFICATE----- |
@ -0,0 +1,27 @@ |
||||
-----BEGIN RSA PRIVATE KEY----- |
||||
MIIEpQIBAAKCAQEA2sJfgDW3dOtDQQzK4Rtei2t/AggrsR8R3e8aZ5Z2FXiQr8CS |
||||
qJj6Bv2j0UiUnTxXX8k9+MCtT42ZKMJfnIeTTz+q31I0jvYX2+Gd2UnJsFNUREYQ |
||||
Lpr0g3vvcxGypKSIV14z01+e1LPKH4VRkaRcOPBqZLT8LTa5if5NPJ5WZja9v3lk |
||||
0YC2WIowplOdGAciV2xs7x4Z8TuxNaph+jz/gl/+wEZXRc3y7iVrpb90mTItgsqQ |
||||
qrtThfIp8QK+EgJrwXpbOK/bUlk6MlXS6xeEff78POkF3ekvXaegxTeZ2vYDyKje |
||||
UADU/Pg5I3axbtPrxOqUN+yKOtrl6vXbJqaNgQIDAQABAoIBAACpTQTcFLaGpgzG |
||||
qz/YN3ZUMD17NRebXJBXUlT9FlUNCOHxIvhdwwa9ok7GCYX6qlh0qSps+bEngE6o |
||||
XMXiPoqjKoLzkotamNqeMV4YbCLLc7IjpJWhfAsAN0p5o5i+ExfxhdZWIAqsUvh6 |
||||
rJMURD+bUXUFu4vu8gtl4ImmAGSddRHN4psOMutywmsMZH54AKxORv+kBwipinED |
||||
gTtiBwJip2ezNOIkyx6Wpfr3k5HfE+2B4etd9RFxbV6VH6/CaNLu3qln3kmTgrmW |
||||
x7xg2OnjuCLB8ve+a/eLs7iQCpswapSJPAJwzg+BEg/VgCt83R+p4gYG9TAhXkjK |
||||
R0dzh+ECgYEA8E1B6Yme0xQhCYyXPnwUhPpnldnkBEfYdgnDIva28reL9CjtbCrz |
||||
k5KoVWZU6Wj5B10wFKWdEIexkxaCIwpI0A5G+Tmae9zAolU/vUIxmYR3MvV2PETr |
||||
eLBa0W00pbSXbOXQHVEwfOG5TiBJMmrnBnElv76A6ZHiBWCUduNAoFECgYEA6QzY |
||||
JJ/WSnI19run9sXyG8DmFQx4sCWoOaXBImjH7OzbveYu+nsMbMEO2GZt40fvwg88 |
||||
k+y6NOidimeDU6FcypS/SwdIKWx9Oy/vtYP3JUxggW9k7dm9Ue8kFjrC7/nDMBAm |
||||
D200ze93r4l6DIRJI1A1AIW4OvQqP8pro5pgfjECgYEArSpPVDbLEDrSL+pzVyDd |
||||
PJKiMNdqvDb14uHYEAsP/UqNfS49IZS2IGMwERKEIAt4YXki284YqD/QlDlFIHEZ |
||||
1Wxkctay341N9+1M2FqqGYHe0AcY5AeaVEdpur9ikALamCvn1Cics3GKMqWLedyV |
||||
jQvecxWaGjb5VHyroBzVhnECgYEAiPo7sIsh8O/gN/1kY+9EtntSwNxrs1zu27NJ |
||||
KWhc2iz9m0hIJIFedC2lBBxwSj5l9bHu8SMa7y4qKsdcsTMOzyNOrFLDX1Wc5cTv |
||||
J8lA4nNZ5boLoKFyXU4p78bp/RLYXs+fD0Io30H5Hvu2+NRoCJGEFaKC/mO00Xmw |
||||
eqCqRoECgYEAr1Pn6p81oZ7aTm2i+mta1F04xwAGwNWNM2i1EHgfyEwnUixle24F |
||||
KemR0ambiVY6XWr7PuwDxz/Rzgk944KH790V5SQtUBXRm/0S+AtKTHnuSuqvf8om |
||||
opHYwDfBB/1Ve3DXkjNs3IUg1PfqZWnCgyIQUH5euwD6Aot9Ra4VSI8= |
||||
-----END RSA PRIVATE KEY----- |
@ -0,0 +1 @@ |
||||
config.php |
@ -0,0 +1,11 @@ |
||||
<?php |
||||
|
||||
//This is the php config file |
||||
$g_db_serverName="Your database server IP or Name"; |
||||
$g_db_usrName="Your database user name"; |
||||
$g_db_psswd="Your password"; |
||||
$g_db_dbName="The main database you select"; |
||||
|
||||
//dogecloud API |
||||
$dc_AccessKey = "Your_AccessKey"; |
||||
$dc_SecretKey = "Your_SecretKey"; |
@ -0,0 +1,557 @@ |
||||
<?php |
||||
include 'config.php'; |
||||
|
||||
session_start(); |
||||
|
||||
/**global var**/ |
||||
$jquery=0; |
||||
|
||||
|
||||
/**functions for html **/ |
||||
|
||||
//print a html header |
||||
function yimian__header($title="Yimian",$keywords="yimian",$description="Yimian Website") |
||||
{ |
||||
|
||||
echo "<!-- |
||||
|
||||
___ ___ |
||||
|\ \ | | |
||||
\ \ \ | | |
||||
\ \ \ | | |
||||
\ \ \_| | ___ _____________ ___ _________ _________ |
||||
\ \ / |\ \ |\ __ __ \ |\ \ |\ ___ \ |\ ___ \ |
||||
\ \ \/ \ \ \ \ \ \-\ \-\ \ \ \ \ \ \ \--\ \ \ \ \--\ \ |
||||
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |
||||
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \__\ \___\ \ \ \ \ |
||||
\ \__\ \ \__\ \ \__\ \__\ \__\ \ \__\ \ \___________\\ \__\ \__\ |
||||
\|__| \|__| \|__| |__| |__| \|__| \|___________| \|__| |__| |
||||
|
||||
--> |
||||
"; |
||||
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> |
||||
"; |
||||
|
||||
echo "<head> |
||||
<meta charset=\"utf-8\"> |
||||
<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\"> |
||||
<link rel=\"icon\" href=\"https://cdn.yimian.ac.cn/img/logo/logo.ico\" type=\"image/x-icon\"/> |
||||
<title>".$title."</title> |
||||
<meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\"/> |
||||
<meta name=\"Keywords\" content=\"".$keywords."\"> |
||||
<meta name=\"Description\" content=\"".$description."\">"; |
||||
} |
||||
|
||||
|
||||
//jquery install |
||||
function js__jquery() |
||||
{ |
||||
if(!$GLOBALS['jquery']) |
||||
{ |
||||
echo "<!-- Include js Jquery and Pjax --> |
||||
<script type=\"text/javascript\" src=\"https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js\"></script> |
||||
<script type=\"text/javascript\" src=\"https://cdn.bootcss.com/jquery.pjax/2.0.1/jquery.pjax.js\"></script>"; |
||||
$GLOBALS['jquery']=1; |
||||
} |
||||
} |
||||
|
||||
|
||||
function js__device() |
||||
{ |
||||
echo " |
||||
<script src=\"https://cdn.bootcss.com/device.js/0.2.7/device.min.js\"></script>"; |
||||
} |
||||
|
||||
|
||||
function css__cleverLogin() |
||||
{ |
||||
echo " |
||||
<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.yimian.ac.cn/clever-login/clever-login_base.css\" /> |
||||
<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.yimian.ac.cn/clever-login/clever-login_icon.css\" /> |
||||
<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.yimian.ac.cn/clever-login/clever-login_normal.css\" /> |
||||
<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.yimian.ac.cn/clever-login/clever-login_reg.css\" />"; |
||||
} |
||||
|
||||
function css__easyVer() |
||||
{ |
||||
echo " |
||||
<link type=\"text/css\" rel=\"stylesheet\" href=\"https://cdn.yimian.ac.cn/easyVer/easyVer.min.css\">"; |
||||
} |
||||
|
||||
//mark the end of the html header |
||||
function yimian__headerEnd() |
||||
{ |
||||
js__jquery(); |
||||
echo " |
||||
<script>console.log('\\n' + ' %c Yimian %c https://www.yimian.xyz ' + '\\n', 'color: #00FFFF; background: #030307; padding:5px 0;', 'background: #4682B4; padding:5px 0;');</script> |
||||
<script>console.log('Thankfully / Proudly include Plugins:'+'\\n');"; |
||||
|
||||
if($GLOBALS['jquery']==1) |
||||
echo "console.log('\\n' + ' %c jQuery v3.3.1 %c https://jquery.com '+ '\\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');console.log('\\n' + ' %c jquery-pjax v2.0.1 %c https://github.com/defunkt/jquery-pjax ' + '\\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');"; |
||||
|
||||
echo "</script> |
||||
<script src=\"https://cdn.yimian.ac.cn/cookie/cookie.js\"></script> |
||||
<script src=\"https://pv.sohu.com/cityjson?ie=utf-8\"></script> |
||||
<script type=\"text/javascript\">ip=returnCitySN.cip;ipCity=returnCitySN.cname;</script> |
||||
<script src=\"https://cdn.yimian.ac.cn/fp/fp.js\"></script> |
||||
</head> |
||||
|
||||
<body>"; |
||||
} |
||||
|
||||
function js__easyVer() |
||||
{ |
||||
echo " |
||||
<script type=\"text/javascript\" src=\"https://cdn.yimian.ac.cn/easyVer/easyVer.min.js\"></script>"; |
||||
} |
||||
|
||||
function js__cleverLogin() |
||||
{ |
||||
echo " |
||||
<script type=\"text/javascript\" src=\"https://cdn.yimian.ac.cn/clever-login/polygonizr.min.js\"></script> |
||||
<script type=\"text/javascript\">$('#site-landing').polygonizr();</script> |
||||
<script type=\"text/javascript\" src=\"https://cdn.yimian.ac.cn/clever-login/clever-login.min.js\"></script>"; |
||||
js__easyVer(); |
||||
} |
||||
|
||||
|
||||
function yimian__heartbeat() |
||||
{ |
||||
echo " |
||||
<script>$.post(\"https://cn.yimian.xyz/heartbeat.php\",{\"ip\":ip,\"fp\":fp,\"city\":ipCity})</script>"; |
||||
} |
||||
|
||||
|
||||
function yimian__simpleFooter($bodyEnd=0) |
||||
{ |
||||
|
||||
if(!$bodyEnd) echo " |
||||
</body>"; |
||||
yimian__heartbeat(); |
||||
echo " |
||||
</html>"; |
||||
|
||||
|
||||
} |
||||
|
||||
//print a html footer |
||||
function yimian__footer($wordColor="#C7C7C7",$backgroundColor="#2B2B2B",$urlColor="#87CEEB") |
||||
{ |
||||
echo " <style>/*footer theme*/footer{padding:1.5rem 1rem;color:".$wordColor.";font-size:1.2rem;line-height:1.4;text-align:center;background:".$backgroundColor.";border-top:1px solid #C7C7C7}a.footera:link{color: ".$urlColor." ; text-decoration:none;}a.footera:visited {color:#79CDCD}</style> |
||||
<script>function openwin(){window.open(\"https://cn.yimian.xyz\");}</script> |
||||
<footer class=\"footer\">Copyright © 2019.<a class=\"footera\" onclick=\"openwin()\" href=\"#\">Yimian LIU</a> All rights reserved.</footer>"; |
||||
yimian__heartbeat(); |
||||
echo "</body> |
||||
</html>"; |
||||
} |
||||
|
||||
|
||||
/**added functions**/ |
||||
//get millis time stamp |
||||
function millis() { |
||||
list($msec, $sec) = explode(' ', microtime()); |
||||
return $msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000); |
||||
} |
||||
|
||||
|
||||
|
||||
/**database connection**/ |
||||
|
||||
//connect to database |
||||
function db__connect($servername="",$username="",$password="",$dbname="") |
||||
{ |
||||
/* reset */ |
||||
if($servername=="") $servername=$GLOBALS['g_db_serverName']; |
||||
if($username=="") $username=$GLOBALS['g_db_usrName']; |
||||
if($password=="") $password=$GLOBALS['g_db_psswd']; |
||||
if($dbname=="") $dbname=$GLOBALS['g_db_dbName']; |
||||
|
||||
$conn = new mysqli($servername, $username, $password, $dbname); |
||||
|
||||
if ($conn->connect_error) |
||||
{ |
||||
die("Mysql Connect Failed: " . $conn->connect_error); |
||||
} |
||||
|
||||
return ($conn); |
||||
} |
||||
|
||||
//get table row number::(data_cnnct var,table name) ::(row number) |
||||
function db__rowNum($conn,$table,$clmnName="",$value="",$clmnName2="",$value2="") |
||||
{ |
||||
|
||||
$table=db__antisql($table); |
||||
$clmnName=db__antisql($clmnName); |
||||
$value=db__antisql($value); |
||||
$clmnName2=db__antisql($clmnName2); |
||||
$value2=db__antisql($value2); |
||||
|
||||
|
||||
if($clmnName=="") $sql = "SELECT COUNT(*) FROM $table"; |
||||
elseif($clmnName2=="") $sql = "SELECT COUNT(*) FROM $table where $clmnName='$value'"; |
||||
else $sql = "SELECT COUNT(*) FROM $table where $clmnName='$value' AND $clmnName2='$value2'"; |
||||
|
||||
$row_count = $conn->query($sql); |
||||
list($row_num) = $row_count->fetch_row(); |
||||
return ($row_num); |
||||
} |
||||
|
||||
//get row data from database::(data_cnnct var, table name,column name, column value)::(row info) |
||||
function db__getData($conn,$table,$clmnName="",$value="",$clmnName2="",$value2="") |
||||
{ |
||||
|
||||
$table=db__antisql($table); |
||||
$clmnName=db__antisql($clmnName); |
||||
$value=db__antisql($value); |
||||
$clmnName2=db__antisql($clmnName2); |
||||
$value2=db__antisql($value2); |
||||
|
||||
|
||||
if($clmnName=="") $sql = "SELECT * FROM $table"; |
||||
elseif($clmnName2=="") $sql = "SELECT * FROM $table where $clmnName='$value'"; |
||||
else $sql = "SELECT * FROM $table where $clmnName='$value' AND $clmnName2='$value2'"; |
||||
|
||||
$result = $conn->query($sql); |
||||
//no data |
||||
if ($result->num_rows > 0) {}else{return 404;} |
||||
|
||||
$i=0; |
||||
$arr=array(); |
||||
while($row = $result->fetch_assoc()) { |
||||
$arr[$i++]=$row; |
||||
} |
||||
return ($arr); |
||||
} |
||||
|
||||
|
||||
//fnct for insert a row to database |
||||
function db__insertData($conn,$table,$content) |
||||
{ |
||||
$table=db__antisql($table); |
||||
|
||||
$key=array_keys($content); |
||||
|
||||
$key=db__antisql($key); |
||||
|
||||
$sql="insert INTO $table ("; |
||||
|
||||
for($i=0;$i<count($key);$i++) |
||||
{ |
||||
$sql.="$key[$i]"; |
||||
if($i!=count($key)-1) $sql.=", "; |
||||
} |
||||
|
||||
$sql.=") VALUES ("; |
||||
|
||||
for($i=0;$i<count($key);$i++) |
||||
{ |
||||
$tmp_key=$key[$i]; |
||||
$content[$tmp_key]=db__antisql($content[$tmp_key]); |
||||
$sql.="'$content[$tmp_key]'"; |
||||
if($i!=count($key)-1) $sql.=", "; |
||||
} |
||||
|
||||
$sql.=")"; |
||||
|
||||
if (!($conn->query($sql) === TRUE)) echo "SQL Insert Error: " . $sql . "<br>" . $conn->error; |
||||
|
||||
} |
||||
|
||||
|
||||
//fnct for update a row to database without check |
||||
function db__updateData($conn,$table,$content,$index) |
||||
{ |
||||
$key=array_keys($content); |
||||
$key=db__antisql($key); |
||||
|
||||
$sql="UPDATE $table SET "; |
||||
|
||||
for($i=0;$i<count($key);$i++) |
||||
{ |
||||
$tmp_key=$key[$i]; |
||||
$content[$tmp_key]=db__antisql($content[$tmp_key]); |
||||
$sql.="$key[$i]='$content[$tmp_key]'"; |
||||
if($i!=count($key)-1) $sql.=", "; |
||||
} |
||||
|
||||
$key=array_keys($index); |
||||
$key=db__antisql($key); |
||||
|
||||
$sql.=" WHERE "; |
||||
|
||||
for($i=0;$i<count($key);$i++) |
||||
{ |
||||
$tmp_key=$key[$i]; |
||||
$index[$tmp_key]=db__antisql($index[$tmp_key]); |
||||
$sql.="$tmp_key='$index[$tmp_key]'"; |
||||
if($i!=count($key)-1) $sql.=" AND "; |
||||
} |
||||
|
||||
if (!($conn->query($sql) === TRUE)) echo "SQL Insert Error: " . $sql . "<br>" . $conn->error; |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
//push row data from database::(data_cnnct var, table name,column name, column value)::(row info) |
||||
function db__pushData($conn,$table,$content,$index="",$is_force=1) |
||||
{ |
||||
if($index) |
||||
{ |
||||
$index_keys=array_keys($index); |
||||
|
||||
if(count($index_keys)==1) $result=db__rowNum($conn,$table,$index_keys[0],$index[$index_keys[0]]); |
||||
|
||||
elseif(count($index_keys)==2) $result=db__rowNum($conn,$table,$index_keys[0],$index[$index_keys[0]],$index_keys[1],$index[$index_keys[1]]); |
||||
|
||||
else return -1; |
||||
|
||||
if($result>0) db__updateData($conn,$table,$content,$index); |
||||
else if($is_force) db__insertData($conn,$table,$content); |
||||
|
||||
} |
||||
else |
||||
db__insertData($conn,$table,$content); |
||||
} |
||||
|
||||
//anti sql |
||||
function db__antisql($str) |
||||
{ |
||||
return(str_ireplace("'","",$str)); |
||||
} |
||||
|
||||
|
||||
/***tools***/ |
||||
//fnct of get usr ip::()::(ip) |
||||
function getip() |
||||
{ |
||||
if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown")) |
||||
{ |
||||
$ip = getenv("HTTP_CLIENT_IP"); |
||||
} |
||||
else |
||||
if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown")) |
||||
{ |
||||
$ip = getenv("HTTP_X_FORWARDED_FOR"); |
||||
} |
||||
else |
||||
if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown")) |
||||
{ |
||||
$ip = getenv("REMOTE_ADDR"); |
||||
} |
||||
else |
||||
if (isset ($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown")) |
||||
{ |
||||
$ip = $_SERVER['REMOTE_ADDR']; |
||||
} |
||||
else |
||||
{ |
||||
$ip = "unknown"; |
||||
} |
||||
return ($ip); |
||||
} |
||||
|
||||
/**functions for aplayer**/ |
||||
|
||||
//put this function to where you want the aplayer to dispaly |
||||
function aplayer__element() |
||||
{ |
||||
echo "<div id=\"aplayer\" class=\"aplayer\"></div>"; |
||||
} |
||||
|
||||
|
||||
//this should put at the near the need of a body, |
||||
//the js object name is ap. |
||||
function aplayer__setup() |
||||
{ |
||||
echo "<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/aplayer@1.10/dist/APlayer.min.css\"> |
||||
<script src=\"https://cdn.jsdelivr.net/npm/aplayer@1.10/dist/APlayer.min.js\"></script>"; |
||||
echo "<script src=\"https://cdn.yimian.ac.cn/aplayer/setup.js\"></script>"; |
||||
} |
||||
|
||||
|
||||
//this should put at the near the need of a body, |
||||
//the js object name is ap. |
||||
function aplayer__setup_mini() |
||||
{ |
||||
echo "<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/aplayer@1.10/dist/APlayer.min.css\"> |
||||
<script src=\"https://cdn.jsdelivr.net/npm/aplayer@1.10/dist/APlayer.min.js\"></script>"; |
||||
echo "<script src=\"https://cdn.yimian.ac.cn/aplayer/setup_mini.js\"></script>"; |
||||
} |
||||
|
||||
//the should put behind the setup function |
||||
function aplayer__add($name="",$artist="unknown",$url="",$coverurl="",$lrcurl="",$theme="#ebd0c2") |
||||
{ |
||||
echo "<script>//script for adding a new music to aplayer |
||||
ap.list.add([{ |
||||
name: '".$name."', |
||||
artist: '".$artist."', |
||||
url: '".$url."', |
||||
cover: '".$coverurl."', |
||||
lrc: '".$lrcurl."', |
||||
theme: '".$theme."' |
||||
}]); |
||||
</script>"; |
||||
} |
||||
|
||||
//play a netease playlist |
||||
function aplayer__netease($playlistid="2012006204",$loadStart=0,$numLimit=10,$theme="#ebd0c2") |
||||
{ |
||||
if(!$GLOBALS['jquery']) js__jquery(); |
||||
echo "<script> |
||||
var nameList=new Array(); |
||||
var artistList=new Array(); |
||||
var urlList=new Array(); |
||||
var coverList=new Array(); |
||||
var lrcList=new Array(); |
||||
var themeList=new Array(); |
||||
$.ajax({ |
||||
type: \"GET\", |
||||
url: 'https://api.bzqll.com/music/netease/songList', |
||||
data: { \"key\": 579621905, |
||||
\"id\": $playlistid, |
||||
\"limit\": $numLimit}, |
||||
traditional: true, |
||||
dataType: 'json', |
||||
success: function (msg) { |
||||
for(var i=$loadStart;i<Math.min(msg.data.songListCount,$numLimit);i++) |
||||
{ |
||||
ap.list.add([{ |
||||
name: msg.data.songs[i].name, |
||||
artist: msg.data.songs[i].singer, |
||||
url: msg.data.songs[i].url, |
||||
cover: msg.data.songs[i].pic, |
||||
lrc: msg.data.songs[i].lrc, |
||||
theme: '$theme' |
||||
}]); |
||||
|
||||
nameList[i-$loadStart]=msg.data.songs[i].name; |
||||
artistList[i-$loadStart]=msg.data.songs[i].singer; |
||||
urlList[i-$loadStart]=msg.data.songs[i].url; |
||||
coverList[i-$loadStart]=msg.data.songs[i].pic; |
||||
lrcList[i-$loadStart]=msg.data.songs[i].lrc; |
||||
themeList[i-$loadStart]='$theme'; |
||||
} |
||||
} |
||||
}); |
||||
</script>"; |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
/**functions for dplayer**/ |
||||
|
||||
//put this function to where you want the dplayer to dispaly |
||||
function dplayer__element() |
||||
{ |
||||
echo "<div id=\"dplayer\"></div>"; |
||||
} |
||||
|
||||
|
||||
//this should put at the near the need of a body, |
||||
//the js object name is dp. |
||||
function dplayer__setup() |
||||
{ |
||||
echo "<script src=\"https://pv.sohu.com/cityjson?ie=utf-8\"></script> |
||||
"; |
||||
echo "<link rel=\"stylesheet\" href=\"https://cn.yimian.xyz/etc/dplayer/DPlayer.min.css\"> |
||||
<script src=\"https://cn.yimian.xyz/etc/dplayer/DPlayer.min.js\"></script>"; |
||||
echo "<script type=\"text/javascript\" src=\"/etc/dplayer/setup.js\"></script> |
||||
"; |
||||
echo "<script src=\"https://pv.sohu.com/cityjson?ie=utf-8\"></script>"; |
||||
} |
||||
|
||||
|
||||
//this should put at the near the need of a body, |
||||
//the js object name is dp. |
||||
function dplayer__setup_once($id) |
||||
{ |
||||
echo "<script src=\"https://pv.sohu.com/cityjson?ie=utf-8\"></script> |
||||
<script src=\"https://cdn.bootcss.com/hls.js/0.10.1/hls.min.js\"></script> |
||||
"; |
||||
echo "<link rel=\"stylesheet\" href=\"https://cn.yimian.xyz/etc/dplayer/DPlayer.min.css\"> |
||||
<script src=\"https://cn.yimian.xyz/etc/dplayer/DPlayer.min.js\"></script>"; |
||||
echo "<script type=\"text/javascript\">//script for set up the dplayer |
||||
//global var for storing current video info |
||||
var g_vId=$id; |
||||
</script> |
||||
<script src=\"/etc/dplayer/setup_once.js\"></script> |
||||
"; |
||||
echo "<script src=\"https://pv.sohu.com/cityjson?ie=utf-8\"></script>"; |
||||
} |
||||
|
||||
//this should put behind the setup function |
||||
function dplayer__add($id="234") |
||||
{ |
||||
echo "<script>//script for adding a new video to aplayer |
||||
newVideo('$id'); |
||||
</script>"; |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
/****API******/ |
||||
|
||||
|
||||
//fnct for dogecloud API |
||||
function api__dogecloud($platform,$vcode,$ip,$AccessKey,$SecretKey){ |
||||
|
||||
$url="https://api.dogecloud.com/video/streams.json?platform=$platform&vcode=$vcode&ip=$ip"; |
||||
|
||||
$str="/video/streams.json?platform=$platform&vcode=$vcode&ip=$ip"."\n"; |
||||
|
||||
$str = hash_hmac("sha1", $str, $SecretKey); |
||||
|
||||
$headerArray =array("Host:api.dogecloud.com","Authorization: TOKEN ".$AccessKey.":".$str); |
||||
$ch = curl_init(); |
||||
curl_setopt($ch, CURLOPT_URL, $url); |
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE); |
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, TRUE); |
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
||||
curl_setopt($ch,CURLOPT_HTTPHEADER,$headerArray); |
||||
$output = curl_exec($ch); |
||||
if($errno = curl_errno($ch)) { |
||||
$error_message = curl_strerror($errno); |
||||
echo "cURL error ({$errno}):\n {$error_message}"; |
||||
} |
||||
|
||||
curl_close($ch); |
||||
|
||||
return $output; |
||||
} |
||||
|
||||
|
||||
|
||||
/****Yimian Video*******/ |
||||
|
||||
function video__bodyUp() |
||||
{ |
||||
if(!isset($_REQUEST['_pjax'])) |
||||
{ |
||||
yimian__header("Yimian Video","video,Yimian","This is the page for showing video class."); |
||||
|
||||
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css\"> |
||||
<link rel=\"stylesheet\" href=\"https://cn.yimian.xyz/video/css/style.css\">"; |
||||
|
||||
|
||||
yimian__headerEnd(); |
||||
|
||||
|
||||
echo file_get_contents("https://cn.yimian.xyz/video/body_up.html"); |
||||
} |
||||
} |
||||
|
||||
|
||||
function video__bodyDown() |
||||
{ |
||||
if(!isset($_REQUEST['_pjax'])) |
||||
{ |
||||
echo file_get_contents("https://cn.yimian.xyz/video/body_down.html"); |
||||
yimian__simpleFooter(); |
||||
} |
||||
} |
||||
|
@ -0,0 +1,2 @@ |
||||
config.php |
||||
old_version |
@ -0,0 +1,2 @@ |
||||
<?php |
||||
header("Location: https://yimian-video.obs.myhwclouds.com/404.mp4");die(); |
@ -0,0 +1,3 @@ |
||||
# YimianVideo |
||||
Video System power for Yimian Web |
||||
## Deverloped from Dplayer |
@ -0,0 +1,105 @@ |
||||
|
||||
<?php |
||||
include '../functions.php'; |
||||
|
||||
header('content-type:text/html;charset=utf-8'); |
||||
|
||||
video__bodyUp(); |
||||
|
||||
$conn=db__connect(); |
||||
|
||||
$class=$_GET['class']; |
||||
|
||||
|
||||
//get row info form table blog with id |
||||
|
||||
|
||||
|
||||
$sql = "SELECT * FROM videoIndx where class=$class"; |
||||
|
||||
|
||||
$result = $conn->query($sql); |
||||
?> |
||||
|
||||
|
||||
|
||||
|
||||
<?php //declear function
|
||||
|
||||
|
||||
|
||||
|
||||
//fnct of get table row number::(data_cnnct var,table name) ::(row number) |
||||
function sql_rowNum($conn,$tableSql) |
||||
{ |
||||
$row_count = $conn->query("SELECT COUNT(*) FROM $tableSql"); |
||||
list($row_num) = $row_count->fetch_row(); |
||||
return ($row_num); |
||||
} |
||||
|
||||
//fnct of getting row data from database::(data_cnnct var, table name,column name, column value)::(row info) |
||||
function sql_data($conn,$table,$clmnName,$value) |
||||
{ |
||||
$sql = "SELECT * FROM $table where $clmnName=$value"; |
||||
|
||||
$result = $conn->query($sql); |
||||
///禁止非法访问 |
||||
if ($result->num_rows > 0) {}else{echo "<script>alert('Illegal Visit!');setTimeout(function(){top.location='/404.php';},0)</script>";} |
||||
|
||||
$row = $result->fetch_assoc(); |
||||
|
||||
return ($row); |
||||
|
||||
} |
||||
|
||||
function array_orderby() |
||||
{ |
||||
$args = func_get_args(); |
||||
$data = array_shift($args); |
||||
foreach ($args as $n => $field) { |
||||
if (is_string($field)) { |
||||
$tmp = array(); |
||||
foreach ($data as $key => $row) |
||||
$tmp[$key] = $row[$field]; |
||||
$args[$n] = $tmp; |
||||
} |
||||
} |
||||
$args[] = &$data; |
||||
call_user_func_array('array_multisort', $args); |
||||
return array_pop($args); |
||||
} |
||||
|
||||
?> |
||||
|
||||
|
||||
<div class="row"> |
||||
<div class="col-lg-8 col-lg-offset-2"> |
||||
<h1 class="page-header"><?php |
||||
if($class==1)echo 'ACG (动漫)'; |
||||
if($class==2)echo 'Movies (电影)'; |
||||
if($class==3)echo 'Documentary (纪录片)'; |
||||
if($class==4)echo 'TV Play (电视剧)'; |
||||
?></h1> |
||||
<p class="lead">Share video with the one you love!</p> |
||||
|
||||
<?php
|
||||
if ($result->num_rows > 0) { |
||||
// 输出数据 |
||||
while($row = $result->fetch_assoc()) { |
||||
echo '<h4><a href="./list.php?idd='.$row['idd'] |
||||
.'">' . $row['series'].'</a></h4><p>'.$row['comment'].'</p><br/>'; |
||||
|
||||
|
||||
} |
||||
} else { |
||||
echo "404 No Found!"; |
||||
}?> |
||||
|
||||
|
||||
</br></br><p><a href="index.php">Click here to go back~</a></p> |
||||
</br> |
||||
</div> |
||||
</div> |
||||
<?php |
||||
video__bodyDown(); |
||||
?> |
@ -0,0 +1,12 @@ |
||||
<?php |
||||
|
||||
include '../../functions.php'; |
||||
|
||||
$id= $_REQUEST[id]; |
||||
|
||||
$conn=db__connect(); |
||||
$result=db__getData($conn,"video","id",$id); |
||||
|
||||
header('Content-type: text/json'); |
||||
echo json_encode(array(id=>$result[0]['id'],series=>$result[0]['series'],name=>$result[0]['name'],type=>$result[0]['type'],url1=>$result[0]['url1'],url2=>$result[0]['url2'],idd=>$result[0]['idd'],vcode=>$result[0]['vcode'],aid=>$result[0]['dans'])); |
||||
die(); |
@ -0,0 +1,10 @@ |
||||
<?php |
||||
|
||||
include '../../functions.php'; |
||||
|
||||
$vcode= $_REQUEST[vcode]; |
||||
$ip= $_REQUEST[ip]; |
||||
|
||||
header('Content-type: text/json'); |
||||
|
||||
echo api__dogecloud("pch5",$vcode,$ip,$GLOBALS['dc_AccessKey'],$GLOBALS['dc_SecretKey']); |
@ -0,0 +1,22 @@ |
||||
<?php |
||||
|
||||
include '../../functions.php'; |
||||
|
||||
$id= $_REQUEST[id]; |
||||
$fp= $_REQUEST[fp]; |
||||
$seek= $_REQUEST[seek]; |
||||
$ip= $_REQUEST[ip]; |
||||
|
||||
$conn=db__connect(); |
||||
|
||||
if(!db__rowNum($conn,"fp","fp",$fp)) |
||||
db__pushData($conn,"fp",array("fp"=>$fp,"videoseek"=>$seek,"video"=>$id,"ip"=>$ip,"videotime"=>time())); |
||||
else |
||||
db__pushData($conn,"fp",array("fp"=>$fp,"videoseek"=>$seek,"video"=>$id,"ip"=>$ip,"videotime"=>time()),array("fp"=>$fp)); |
||||
|
||||
|
||||
db__pushData($conn,"videolog",array("ip"=>$ip,"fp"=>$fp,"seek"=>$seek,"video"=>$id,"time"=>time()),array("fp"=>$fp,"video"=>$id)); |
||||
|
||||
header('Content-type: text/json'); |
||||
|
||||
die(); |
@ -0,0 +1,15 @@ |
||||
<?php |
||||
|
||||
include '../../functions.php'; |
||||
|
||||
$id= $_REQUEST[id]; |
||||
|
||||
$conn=db__connect(); |
||||
$result=db__getData($conn,"videoredirect","id",$id); |
||||
|
||||
header('Content-type: text/json'); |
||||
|
||||
if(count($result)) |
||||
echo json_encode(array(id=>$result[0]['id'],toid=>$result[0]['toid'])); |
||||
else json_encode(array(id=>0)); |
||||
die(); |
@ -0,0 +1,15 @@ |
||||
<?php |
||||
|
||||
include '../../functions.php'; |
||||
|
||||
$id= $_REQUEST[id]; |
||||
|
||||
$conn=db__connect(); |
||||
$result=db__getData($conn,"videotourl","id",$id); |
||||
|
||||
header('Content-type: text/json'); |
||||
|
||||
if(count($result)) |
||||
echo json_encode(array(id=>$result[0]['id'],url=>$result[0]['url'],hint=>$result[0]['hint'])); |
||||
else json_encode(array(id=>0)); |
||||
die(); |
@ -0,0 +1,48 @@ |
||||
|
||||
</div> |
||||
</div> |
||||
<!-- /#page-content-wrapper --> |
||||
|
||||
</div> |
||||
<!-- /#wrapper --> |
||||
|
||||
<script>$(document).pjax('a', '.container');</script> |
||||
<script src="https://cn.yimian.xyz/video/js/bootstrap.min.js"></script> |
||||
<script type="text/javascript"> |
||||
$(document).ready(function () { |
||||
var trigger = $('.hamburger'), |
||||
overlay = $('.overlay'), |
||||
isClosed = false; |
||||
|
||||
$(document).on('pjax:send', function() { |
||||
if (isClosed == true) { |
||||
hamburger_cross(); |
||||
$('#wrapper').toggleClass('toggled'); |
||||
} |
||||
}) |
||||
|
||||
trigger.click(function () { |
||||
hamburger_cross(); |
||||
}); |
||||
|
||||
function hamburger_cross() { |
||||
|
||||
if (isClosed == true) { |
||||
overlay.hide(); |
||||
trigger.removeClass('is-open'); |
||||
trigger.addClass('is-closed'); |
||||
isClosed = false; |
||||
} else { |
||||
overlay.show(); |
||||
trigger.removeClass('is-closed'); |
||||
trigger.addClass('is-open'); |
||||
isClosed = true; |
||||
} |
||||
} |
||||
|
||||
$('[data-toggle=\"offcanvas\"]').click(function () { |
||||
$('#wrapper').toggleClass('toggled'); |
||||
}); |
||||
}); |
||||
</script> |
||||
|
@ -0,0 +1,42 @@ |
||||
|
||||
|
||||
<div id="wrapper"> |
||||
<div class="overlay"></div> |
||||
|
||||
<!-- Sidebar --> |
||||
<nav class="navbar navbar-inverse navbar-fixed-top" id="sidebar-wrapper" role="navigation"> |
||||
<ul class="nav sidebar-nav"> |
||||
<li class="sidebar-brand"> |
||||
<a href="./"> |
||||
Yimian Video |
||||
</a> |
||||
</li> |
||||
<li> <a href="./"><i class="fa fa-fw fa-home"></i>Video Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="./acg.php?class=1"><i class="fa fa-fw fa-folder"></i> ACG</a> |
||||
</li> |
||||
<li> |
||||
<a href="./acg.php?class=2"><i class="fa fa-fw fa-file-o"></i> Movies</a> |
||||
</li> |
||||
<li> |
||||
<a href="./acg.php?class=3"><i class="fa fa-fw fa-cog"></i> Documentary</a> |
||||
</li> |
||||
<li> |
||||
<a href="./acg.php?class=4"><i class="fa fa-fw fa-cog"></i> TV Play</a> |
||||
</li> |
||||
<li> |
||||
<a href="#" onclick="window.location.href='https://cn.yimian.xyz'"><i class="fa fa-fw fa-twitter"></i>Back to Yimian Page</a> |
||||
</li> |
||||
</ul> |
||||
</nav> |
||||
<!-- /#sidebar-wrapper --> |
||||
|
||||
<!-- Page Content --> |
||||
<div id="page-content-wrapper"> |
||||
<button type="button" class="hamburger is-closed animated fadeInLeft" data-toggle="offcanvas"> |
||||
<span class="hamb-top"></span> |
||||
<span class="hamb-middle"></span> |
||||
<span class="hamb-bottom"></span> |
||||
</button> |
||||
<div class="container"> |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,310 @@ |
||||
@import "https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"; |
||||
|
||||
/*-------------------------------*/ |
||||
/* VARIABLES */ |
||||
/*-------------------------------*/ |
||||
body { |
||||
position: relative; |
||||
overflow-x: hidden; |
||||
} |
||||
body, |
||||
html { |
||||
height: 100%; |
||||
background-color: #583e7e; |
||||
} |
||||
.nav .open > a { |
||||
background-color: transparent; |
||||
} |
||||
.nav .open > a:hover { |
||||
background-color: transparent; |
||||
} |
||||
.nav .open > a:focus { |
||||
background-color: transparent; |
||||
} |
||||
/*-------------------------------*/ |
||||
/* Wrappers */ |
||||
/*-------------------------------*/ |
||||
#wrapper { |
||||
-moz-transition: all 0.5s ease; |
||||
-o-transition: all 0.5s ease; |
||||
-webkit-transition: all 0.5s ease; |
||||
padding-left: 0; |
||||
transition: all 0.5s ease; |
||||
} |
||||
#wrapper.toggled { |
||||
padding-left: 220px; |
||||
} |
||||
#wrapper.toggled #sidebar-wrapper { |
||||
width: 220px; |
||||
} |
||||
#wrapper.toggled #page-content-wrapper { |
||||
margin-right: -220px; |
||||
position: absolute; |
||||
} |
||||
#sidebar-wrapper { |
||||
-moz-transition: all 0.5s ease; |
||||
-o-transition: all 0.5s ease; |
||||
-webkit-transition: all 0.5s ease; |
||||
background: #1a1a1a; |
||||
height: 100%; |
||||
left: 220px; |
||||
margin-left: -220px; |
||||
overflow-x: hidden; |
||||
overflow-y: auto; |
||||
transition: all 0.5s ease; |
||||
width: 0; |
||||
z-index: 1000; |
||||
} |
||||
#sidebar-wrapper::-webkit-scrollbar { |
||||
display: none; |
||||
} |
||||
#page-content-wrapper { |
||||
padding-top: 70px; |
||||
width: 100%; |
||||
} |
||||
/*-------------------------------*/ |
||||
/* Sidebar nav styles */ |
||||
/*-------------------------------*/ |
||||
.sidebar-nav { |
||||
list-style: none; |
||||
margin: 0; |
||||
padding: 0; |
||||
position: absolute; |
||||
top: 0; |
||||
width: 220px; |
||||
} |
||||
.sidebar-nav li { |
||||
display: inline-block; |
||||
line-height: 20px; |
||||
position: relative; |
||||
width: 100%; |
||||
} |
||||
.sidebar-nav li:before { |
||||
background-color: #1c1c1c; |
||||
content: ''; |
||||
height: 100%; |
||||
left: 0; |
||||
position: absolute; |
||||
top: 0; |
||||
-webkit-transition: width 0.2s ease-in; |
||||
transition: width 0.2s ease-in; |
||||
width: 3px; |
||||
z-index: -1; |
||||
} |
||||
.sidebar-nav li:first-child a { |
||||
background-color: #1a1a1a; |
||||
color: #ffffff; |
||||
} |
||||
.sidebar-nav li:nth-child(2):before { |
||||
background-color: #402d5c; |
||||
} |
||||
.sidebar-nav li:nth-child(3):before { |
||||
background-color: #4c366d; |
||||
} |
||||
.sidebar-nav li:nth-child(4):before { |
||||
background-color: #583e7e; |
||||
} |
||||
.sidebar-nav li:nth-child(5):before { |
||||
background-color: #64468f; |
||||
} |
||||
.sidebar-nav li:nth-child(6):before { |
||||
background-color: #704fa0; |
||||
} |
||||
.sidebar-nav li:nth-child(7):before { |
||||
background-color: #7c5aae; |
||||
} |
||||
.sidebar-nav li:nth-child(8):before { |
||||
background-color: #8a6cb6; |
||||
} |
||||
.sidebar-nav li:nth-child(9):before { |
||||
background-color: #987dbf; |
||||
} |
||||
.sidebar-nav li:hover:before { |
||||
-webkit-transition: width 0.2s ease-in; |
||||
transition: width 0.2s ease-in; |
||||
width: 100%; |
||||
} |
||||
.sidebar-nav li a { |
||||
color: #dddddd; |
||||
display: block; |
||||
padding: 10px 15px 10px 30px; |
||||
text-decoration: none; |
||||
} |
||||
.sidebar-nav li.open:hover before { |
||||
-webkit-transition: width 0.2s ease-in; |
||||
transition: width 0.2s ease-in; |
||||
width: 100%; |
||||
} |
||||
.sidebar-nav .dropdown-menu { |
||||
background-color: #222222; |
||||
border-radius: 0; |
||||
border: none; |
||||
box-shadow: none; |
||||
margin: 0; |
||||
padding: 0; |
||||
position: relative; |
||||
width: 100%; |
||||
} |
||||
.sidebar-nav li a:hover, |
||||
.sidebar-nav li a:active, |
||||
.sidebar-nav li a:focus, |
||||
.sidebar-nav li.open a:hover, |
||||
.sidebar-nav li.open a:active, |
||||
.sidebar-nav li.open a:focus { |
||||
background-color: transparent; |
||||
color: #ffffff; |
||||
text-decoration: none; |
||||
} |
||||
.sidebar-nav > .sidebar-brand { |
||||
font-size: 20px; |
||||
height: 65px; |
||||
line-height: 44px; |
||||
} |
||||
/*-------------------------------*/ |
||||
/* Hamburger-Cross */ |
||||
/*-------------------------------*/ |
||||
.hamburger { |
||||
background: transparent; |
||||
border: none; |
||||
display: block; |
||||
height: 32px; |
||||
margin-left: 15px; |
||||
position: fixed; |
||||
top: 20px; |
||||
width: 32px; |
||||
z-index: 999; |
||||
} |
||||
.hamburger:hover { |
||||
outline: none; |
||||
} |
||||
.hamburger:focus { |
||||
outline: none; |
||||
} |
||||
.hamburger:active { |
||||
outline: none; |
||||
} |
||||
.hamburger.is-closed:before { |
||||
-webkit-transform: translate3d(0, 0, 0); |
||||
-webkit-transition: all 0.35s ease-in-out; |
||||
color: #ffffff; |
||||
content: ''; |
||||
display: block; |
||||
font-size: 14px; |
||||
line-height: 32px; |
||||
opacity: 0; |
||||
text-align: center; |
||||
width: 100px; |
||||
} |
||||
.hamburger.is-closed:hover before { |
||||
-webkit-transform: translate3d(-100px, 0, 0); |
||||
-webkit-transition: all 0.35s ease-in-out; |
||||
display: block; |
||||
opacity: 1; |
||||
} |
||||
.hamburger.is-closed:hover .hamb-top { |
||||
-webkit-transition: all 0.35s ease-in-out; |
||||
top: 0; |
||||
} |
||||
.hamburger.is-closed:hover .hamb-bottom { |
||||
-webkit-transition: all 0.35s ease-in-out; |
||||
bottom: 0; |
||||
} |
||||
.hamburger.is-closed .hamb-top { |
||||
-webkit-transition: all 0.35s ease-in-out; |
||||
background-color: rgba(255, 255, 255, 0.7); |
||||
top: 5px; |
||||
} |
||||
.hamburger.is-closed .hamb-middle { |
||||
background-color: rgba(255, 255, 255, 0.7); |
||||
margin-top: -2px; |
||||
top: 50%; |
||||
} |
||||
.hamburger.is-closed .hamb-bottom { |
||||
-webkit-transition: all 0.35s ease-in-out; |
||||
background-color: rgba(255, 255, 255, 0.7); |
||||
bottom: 5px; |
||||
} |
||||
.hamburger.is-closed .hamb-top, |
||||
.hamburger.is-closed .hamb-middle, |
||||
.hamburger.is-closed .hamb-bottom, |
||||
.hamburger.is-open .hamb-top, |
||||
.hamburger.is-open .hamb-middle, |
||||
.hamburger.is-open .hamb-bottom { |
||||
height: 4px; |
||||
left: 0; |
||||
position: absolute; |
||||
width: 100%; |
||||
} |
||||
.hamburger.is-open .hamb-top { |
||||
-webkit-transform: rotate(45deg); |
||||
-webkit-transition: -webkit-transform 0.2s cubic-bezier(0.73, 1, 0.28, 0.08); |
||||
background-color: #ffffff; |
||||
margin-top: -2px; |
||||
top: 50%; |
||||
} |
||||
.hamburger.is-open .hamb-middle { |
||||
background-color: #ffffff; |
||||
display: none; |
||||
} |
||||
.hamburger.is-open .hamb-bottom { |
||||
-webkit-transform: rotate(-45deg); |
||||
-webkit-transition: -webkit-transform 0.2s cubic-bezier(0.73, 1, 0.28, 0.08); |
||||
background-color: #ffffff; |
||||
margin-top: -2px; |
||||
top: 50%; |
||||
} |
||||
.hamburger.is-open:before { |
||||
-webkit-transform: translate3d(0, 0, 0); |
||||
-webkit-transition: all 0.35s ease-in-out; |
||||
color: #ffffff; |
||||
content: ''; |
||||
display: block; |
||||
font-size: 14px; |
||||
line-height: 32px; |
||||
opacity: 0; |
||||
text-align: center; |
||||
width: 100px; |
||||
} |
||||
.hamburger.is-open:hover before { |
||||
-webkit-transform: translate3d(-100px, 0, 0); |
||||
-webkit-transition: all 0.35s ease-in-out; |
||||
display: block; |
||||
opacity: 1; |
||||
} |
||||
/*-------------------------------*/ |
||||
/* Dark Overlay */ |
||||
/*-------------------------------*/ |
||||
.overlay { |
||||
position: fixed; |
||||
display: none; |
||||
width: 100%; |
||||
height: 100%; |
||||
top: 0; |
||||
left: 0; |
||||
right: 0; |
||||
bottom: 0; |
||||
background-color: rgba(0, 0, 0, 0.4); |
||||
z-index: 1; |
||||
} |
||||
/* SOME DEMO STYLES - NOT REQUIRED */ |
||||
body, |
||||
html { |
||||
background-color: #583e7e; |
||||
} |
||||
body h1, |
||||
body h2, |
||||
body h3, |
||||
body h4 { |
||||
color: rgba(255, 255, 255, 0.9); |
||||
} |
||||
body p, |
||||
body blockquote { |
||||
color: rgba(255, 255, 255, 0.7); |
||||
} |
||||
body a { |
||||
color: rgba(255, 255, 255, 0.8); |
||||
text-decoration: underline; |
||||
} |
||||
body a:hover { |
||||
color: #ffffff; |
||||
} |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
Binary file not shown.
@ -0,0 +1,10 @@ |
||||
<?php |
||||
include '../functions.php'; |
||||
|
||||
$fp=$_REQUEST['fp']; |
||||
|
||||
$res=db__getData(db__connect(),"fp","fp",$fp); |
||||
|
||||
if($res[0]['video']&&$res[0]['video']!=234) echo json_encode(array("code"=>1)); |
||||
|
||||
|
@ -0,0 +1,11 @@ |
||||
<?php |
||||
include '../functions.php'; |
||||
|
||||
video__bodyUp(); |
||||
|
||||
echo file_get_contents("./mainlist.html"); |
||||
|
||||
video__bodyDown(); |
||||
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,99 @@ |
||||
<!DOCTYPE html> |
||||
|
||||
|
||||
<?php |
||||
include '../functions.php'; |
||||
|
||||
header('content-type:text/html;charset=utf-8'); |
||||
$conn=db__connect(); |
||||
|
||||
$idd=$_GET['idd']; |
||||
|
||||
video__bodyUp(); |
||||
//get row info form table blog with id |
||||
$series= sql_data($conn,'videoIndx','idd',$idd); |
||||
|
||||
$seriesName= $series['series']; |
||||
|
||||
$class= $series['class']; |
||||
|
||||
$sql = "SELECT * FROM video where idd=$idd"; |
||||
|
||||
|
||||
$result = $conn->query($sql); |
||||
?> |
||||
|
||||
|
||||
|
||||
|
||||
<?php //declear function
|
||||
|
||||
|
||||
|
||||
//fnct of get table row number::(data_cnnct var,table name) ::(row number) |
||||
function sql_rowNum($conn,$tableSql) |
||||
{ |
||||
$row_count = $conn->query("SELECT COUNT(*) FROM $tableSql"); |
||||
list($row_num) = $row_count->fetch_row(); |
||||
return ($row_num); |
||||
} |
||||
|
||||
//fnct of getting row data from database::(data_cnnct var, table name,column name, column value)::(row info) |
||||
function sql_data($conn,$table,$clmnName,$value) |
||||
{ |
||||
$sql = "SELECT * FROM $table where $clmnName=$value"; |
||||
|
||||
$result = $conn->query($sql); |
||||
///禁止非法访问 |
||||
if ($result->num_rows > 0) {}else{echo "<script>alert('Illegal Visit!');setTimeout(function(){top.location='/404.php';},0)</script>";} |
||||
|
||||
$row = $result->fetch_assoc(); |
||||
|
||||
return ($row); |
||||
|
||||
} |
||||
|
||||
function array_orderby() |
||||
{ |
||||
$args = func_get_args(); |
||||
$data = array_shift($args); |
||||
foreach ($args as $n => $field) { |
||||
if (is_string($field)) { |
||||
$tmp = array(); |
||||
foreach ($data as $key => $row) |
||||
$tmp[$key] = $row[$field]; |
||||
$args[$n] = $tmp; |
||||
} |
||||
} |
||||
$args[] = &$data; |
||||
call_user_func_array('array_multisort', $args); |
||||
return array_pop($args); |
||||
} |
||||
|
||||
?> |
||||
|
||||
|
||||
|
||||
<div class="row"> |
||||
<div class="col-lg-8 col-lg-offset-2"> |
||||
<h1 class="page-header"><?php echo $seriesName?></h1>
|
||||
<p class="lead">Share video with the one you love!</p> |
||||
<?php
|
||||
if ($result->num_rows > 0) { |
||||
// 输出数据 |
||||
while($row = $result->fetch_assoc()) { |
||||
echo '<p><a href="#" onclick="window.location.href=\'./video.php?id='.$row['id'] |
||||
.'\'">' . $row['name'].'</a></p>'; |
||||
|
||||
|
||||
} |
||||
} else { |
||||
echo "404 No Found!"; |
||||
}?> |
||||
</br></br><p><a href="acg.php?class=<?php echo $class?>">Click here to go back~</a></p>
|
||||
</br> |
||||
|
||||
</div> |
||||
</div> |
||||
<?php video__bodyDown(); |
||||
|
@ -0,0 +1,27 @@ |
||||
|
||||
<div class="row"> |
||||
<div class="col-lg-8 col-lg-offset-2"> |
||||
<h1 class="page-header">Yimian Video</h1> |
||||
<p class="lead">Share video with the one you love!</p> |
||||
|
||||
<h3><a href="./acg.php?class=1">ACG (动漫)</a></h3> |
||||
|
||||
<h3><a href="./acg.php?class=2">Movies (电影)</a></h3> |
||||
|
||||
<h3><a href="./acg.php?class=3">Documentary (纪录片)</a></h3> |
||||
|
||||
<h3><a href="./acg.php?class=4">TV Play (电视剧)</a></h3> |
||||
|
||||
<h3 id="p1"></h3> |
||||
</div> |
||||
</div> |
||||
|
||||
<script> |
||||
var watching=0; |
||||
$.post("./fpcheck.php",{ |
||||
fp: fp |
||||
}, |
||||
function(msg){ |
||||
if(msg.code==1){document.getElementById("p1").innerHTML='<a href="#" onclick="window.location.href=\'./video.php\'">点这里继续上次播放!</a>';} |
||||
},"json"); |
||||
</script> |
@ -0,0 +1,151 @@ |
||||
<?php |
||||
include '../functions.php'; |
||||
|
||||
$conn=db__connect(); |
||||
|
||||
if(isset($_COOKIE['fp'])) |
||||
{ |
||||
$fp=$_COOKIE['fp']; |
||||
|
||||
$res=db__getData(db__connect(),"videolog","fp",$fp); |
||||
|
||||
foreach($res as $data) |
||||
{ |
||||
setcookie("vTime_".$data['video'],$data['seek']); |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
if(!isset($_REQUEST['id'])) |
||||
{ |
||||
if(isset($_COOKIE['fp'])) |
||||
{ |
||||
$conn=db__connect(); |
||||
|
||||
$fp=$_COOKIE['fp']; |
||||
|
||||
$result=db__getData($conn,"fp","fp",$fp); |
||||
|
||||
$r_usr=$result[0]['usr']; |
||||
|
||||
if(!$r_usr) $res=$result; |
||||
else |
||||
{ |
||||
$res=db__getData($conn,"fp","usr",$r_usr); |
||||
$resUser=db__getData($conn,"user","tel",$r_usr); |
||||
$_SESSION['s_usr']=$resUser[0]['name']; |
||||
} |
||||
$max=0; |
||||
|
||||
for($i=1;$i<count($res);$i++) |
||||
{ |
||||
if($res[$i]['videotime']>$res[$max]['videotime']) $max=$i; |
||||
} |
||||
|
||||
setcookie("vTime_".$res[$max]['video'],$res[$max]['videoseek'],time()+3600*24*365*15); |
||||
|
||||
$_REQUEST['id']=$res[$max]['video']; |
||||
//echo "<script>window.location.href='./video.php?id=".$res[$max]['video']."';</script>"; |
||||
|
||||
} |
||||
else |
||||
header("Location: https://cn.yimian.xyz/404.php"); |
||||
} |
||||
|
||||
|
||||
|
||||
yimian__header("Yimian Video","video,Yimian","This is the page for playing a video."); |
||||
|
||||
js__jquery(); |
||||
|
||||
echo "<style>#dplayer{z-index: 999}</style>"; |
||||
|
||||
js__device(); |
||||
|
||||
yimian__headerEnd(); |
||||
|
||||
dplayer__element(); |
||||
|
||||
echo " |
||||
<script> |
||||
var is_next=1; |
||||
</script>"; |
||||
|
||||
dplayer__setup(); |
||||
dplayer__add($_REQUEST['id']); |
||||
|
||||
echo " |
||||
<script> |
||||
$(\"#next\").on(\"click\",function (){nextVideo();}); |
||||
</script>"; |
||||
?> |
||||
|
||||
<div id="pub-board"> |
||||
|
||||
<p id="usrName"></p> |
||||
|
||||
<p id="videoSeries"></p> |
||||
|
||||
<p id="videoName"></p> |
||||
|
||||
<p id="videoId"></p> |
||||
|
||||
<p id="videoLength"></p> |
||||
|
||||
<p id="videoDownload"></p> |
||||
|
||||
<p id="videoState"></p> |
||||
|
||||
<p id="videoSeek"></p> |
||||
|
||||
<p id="dansFrom"></p> |
||||
|
||||
<p id="dansLength"></p> |
||||
|
||||
<p id="back"></p> |
||||
</div> |
||||
<script> |
||||
$("#usrName").html("UserName: <?php if(isset($_SESSION['s_usr']))echo $_SESSION['s_usr'];else |
||||
{ |
||||
if(isset($_COOKIE['fp'])) |
||||
{ |
||||
$fp=$_COOKIE['fp']; |
||||
|
||||
$resfp=db__getData($conn,"fp","fp",$fp); |
||||
if($resfp[0]['usr']==null||$resfp[0]['usr']=="") echo "没有登录?<a href='https://cn.yimian.xyz/login?from=https://cn.yimian.xyz/video/video.php'>戳我注册~</a>"; |
||||
else { |
||||
$resusr=db__getData($conn,"user","tel",$resfp[0]['usr']); |
||||
echo $resusr[0][name]; |
||||
} |
||||
|
||||
} |
||||
else |
||||
echo "没有登录?<a href='https://cn.yimian.xyz/login?from=https://cn.yimian.xyz/video/video.php'>戳我注册~</a>";}?>"); |
||||
|
||||
function attach() |
||||
{ |
||||
$("#videoSeries").html("VideoSeries: "+g_vSeries); |
||||
$("#videoName").html("VideoName: "+g_vName); |
||||
$("#videoId").html("VideoId: "+g_vId); |
||||
$("#videoLength").html("VideoDuration: "+dp.video.duration+'s'); |
||||
$("#videoDownload").html("VideoDownloadUrl: <a href='"+g_vUrl2+"'>"+g_vUrl2+"</a>"); |
||||
$("#videoState").html("PlayState: "+!dp.video.paused); |
||||
$("#videoSeek").html("PlaySeek: "+dp.video.currentTime+'s'); |
||||
(dp.danmaku.dan.length>1500)||$("#dansFrom").html("DansBilibili: Off"); |
||||
(dp.danmaku.dan.length>1500)&&$("#dansFrom").html("DansBilibili: On"); |
||||
$("#dansLength").html("DansAmount: "+dp.danmaku.dan.length); |
||||
$("#back").html("<a href='./list.php?idd="+g_vIdd+"'>Click here to go Back~</a>"); |
||||
|
||||
} |
||||
|
||||
</script> |
||||
|
||||
<script> |
||||
if(!device.mobile()&&fp!='938b6ae8') $("#dplayer").css({"height":"auto","width":"80%","margin":"auto"}); |
||||
if(fp=='938b6ae8') {dp.fullScreen.request('web');setTimeout( 'dp.play()',2000)} |
||||
</script> |
||||
|
||||
|
||||
<? |
||||
yimian__footer(); |
@ -0,0 +1,44 @@ |
||||
<?php |
||||
include '../functions.php'; |
||||
|
||||
|
||||
$id=$_REQUEST['id']; |
||||
$fp=$_REQUEST['fp']; |
||||
|
||||
|
||||
if(isset($_SESSION['s_fp'])) |
||||
{ |
||||
if($_SESSION['s_fp']!=$fp) {header("Location: https://yimian-video.obs.myhwclouds.com/404.mp4");die();} |
||||
} |
||||
|
||||
|
||||
if(!isset($fp)||$fp=="") {header("Location: https://yimian-video.obs.myhwclouds.com/404.mp4");die();} |
||||
|
||||
|
||||
$conn=db__connect(); |
||||
|
||||
$usr=db__getData($conn,"fp","fp",$fp); |
||||
|
||||
if($usr[0]['usr']=="") |
||||
{ |
||||
|
||||
$res=db__getData($conn,"videolog","fp",$fp); |
||||
|
||||
$cnt=0; |
||||
|
||||
foreach($res as $each) |
||||
{ |
||||
if($each['time']>(time()-3600*24)) $cnt++; |
||||
} |
||||
|
||||
if($cnt>20) |
||||
{ |
||||
echo json_encode(array("code"=>2)); |
||||
|
||||
die(); |
||||
} |
||||
} |
||||
|
||||
$video=db__getData($conn,"video","id",$id); |
||||
|
||||
header("Location: ".$video[0]['url1']); |
Loading…
Reference in new issue