iotcat 4 years ago
parent c644047465
commit c15eeb381a
  1. 40
      api/checkout.php
  2. 28
      api/confirmBalance.php
  3. 39
      api/createTable.php
  4. 798
      api/functions.php
  5. 21
      api/getData.php
  6. 24
      api/joinTable.php
  7. 52
      api/newItem.php
  8. 22
      api/updateTable.php
  9. 1579
      css/animate.css
  10. 8869
      css/bootstrap.min.css
  11. 1150
      css/cryptocoins.css
  12. 4
      css/font-awesome.min.css
  13. 3220
      css/global.style.css
  14. 12
      css/swiper.min.css
  15. BIN
      fonts/cryptocoins.woff2
  16. BIN
      fonts/fontawesome-webfont3e6e3e6e.woff2
  17. BIN
      img/assets/news-list-image-1.jpg
  18. BIN
      img/assets/news-list-image-2.jpg
  19. BIN
      img/avatar.png
  20. BIN
      img/content/1.png
  21. BIN
      img/content/10.png
  22. BIN
      img/content/11.png
  23. BIN
      img/content/14.png
  24. BIN
      img/content/15.png
  25. BIN
      img/content/2.png
  26. BIN
      img/content/3.png
  27. BIN
      img/content/4.png
  28. BIN
      img/content/5.png
  29. BIN
      img/content/6.png
  30. BIN
      img/content/7.png
  31. BIN
      img/content/8.png
  32. BIN
      img/content/9.png
  33. BIN
      img/content/avatar/avatar-1.png
  34. BIN
      img/content/avatar/avatar-2.png
  35. BIN
      img/content/avatar/avatar-3.png
  36. BIN
      img/content/avatar/avatar-4.png
  37. BIN
      img/content/avatar/avatar-5.png
  38. BIN
      img/content/avatar/user-1.png
  39. BIN
      img/content/avatar/user-2.png
  40. BIN
      img/content/avatar/user-3.png
  41. BIN
      img/content/avatar/user-4.png
  42. BIN
      img/content/b1-bg.png
  43. BIN
      img/content/coin1.png
  44. BIN
      img/content/coin2.png
  45. BIN
      img/content/coin3.png
  46. BIN
      img/content/coin4.png
  47. BIN
      img/content/coin5.png
  48. BIN
      img/content/coin6.png
  49. BIN
      img/content/coin7.png
  50. BIN
      img/content/coin8.png
  51. BIN
      img/content/crypto-buy.png
  52. BIN
      img/content/dash-bg.jpg
  53. BIN
      img/content/exchange.png
  54. BIN
      img/content/icons/1.png
  55. BIN
      img/content/icons/10.png
  56. BIN
      img/content/icons/11.png
  57. BIN
      img/content/icons/14.png
  58. BIN
      img/content/icons/15.png
  59. BIN
      img/content/icons/2.png
  60. BIN
      img/content/icons/3.png
  61. BIN
      img/content/icons/4.png
  62. BIN
      img/content/icons/5.png
  63. BIN
      img/content/icons/6.png
  64. BIN
      img/content/icons/7.png
  65. BIN
      img/content/icons/8.png
  66. BIN
      img/content/icons/9.png
  67. BIN
      img/content/notification1.png
  68. BIN
      img/content/notification2.png
  69. BIN
      img/content/onboard1.png
  70. BIN
      img/content/onboard2.png
  71. BIN
      img/content/onboard3.png
  72. BIN
      img/content/p1.png
  73. BIN
      img/content/p2.png
  74. BIN
      img/content/p3.png
  75. BIN
      img/content/qr.png
  76. BIN
      img/content/ref-icon1.png
  77. BIN
      img/content/ref-icon2.png
  78. BIN
      img/content/ref-icon3.png
  79. BIN
      img/content/ref-icon4.png
  80. BIN
      img/content/ref1.png
  81. BIN
      img/content/ref2.png
  82. BIN
      img/content/ref3.png
  83. BIN
      img/content/s1.png
  84. BIN
      img/content/s2.png
  85. BIN
      img/content/s3.png
  86. BIN
      img/content/trans-bg1.png
  87. BIN
      img/content/trans-bg2.png
  88. 41
      img/up-down.svg
  89. 577
      index.html
  90. 177
      js/app-charts.js
  91. 281
      js/global.script.js
  92. 4
      js/jquery-3.2.1.min.js
  93. 1
      js/qrcode.min.js
  94. 13
      js/swiper.min.js
  95. 191
      plugins/c3-chart/c3.css
  96. 271
      plugins/c3-chart/c3.custom.js
  97. 5
      plugins/c3-chart/c3.min.js
  98. 5
      plugins/c3-chart/d3.min.js
  99. 8
      plugins/flot/jquery.flot.min.js
  100. 7
      plugins/flot/jquery.flot.pie.min.js
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,40 @@
<?php
include './functions.php';
$hash = $_REQUEST['hash'];
$tableId = $_REQUEST['tableId'];
if(!isset($hash) || !isset($tableId)) die();
$cnn = db__connect();
$data = getFinalData($cnn, $tableId);
if($data['average'] > $data['virtualTotals'][$hash]){
foreach($data['users'] as $user){
$to = $user;
if($to != $hash) break;
}
setBalance($hash, $to, $data['average'] - $data['virtualTotals'][$hash], $tableId, $cnn);
}
if($data['average'] < $data['virtualTotals'][$hash]){
foreach($data['users'] as $user){
$to = $user;
if($to != $hash) break;
}
setBalance($to, $hash, - $data['average'] + $data['virtualTotals'][$hash], $tableId, $cnn);
}
db__pushData($cnn, "user", array(
"state" => '0',
"updated_at" => date("Y-m-d H:i:s", time())
), array(
"user" => $hash,
"table" => $tableId
));
echo '<script>alert("您已退出!请根据邮件提示进行checkout!!");window.location.href="https://cp-acc.yimian.xyz/"</script>';

@ -0,0 +1,28 @@
<?php
include './functions.php';
$first = $_REQUEST['first'];
$last = $_REQUEST['last'];
if(!isset($first) || !isset($last)) die();
$cnn = db__connect();
db__pushData($cnn, "account", array(
"state" => '1'
), array(
"id" => $first
));
db__pushData($cnn, "account", array(
"state" => '1'
), array(
"id" => $last
));
echo '<script>
alert("收款确认成功");
window.location.href="https://cp-acc.yimian.xyz/";
</script>';

@ -0,0 +1,39 @@
<?php
include './functions.php';
header("Content-type:application/json");
$hash = $_REQUEST['hash'];
$name = $_REQUEST['name'];
$threshold = $_REQUEST['threshold'];
if(!isset($hash) || !isset($name) || !isset($threshold)) die();
$tableId = hash('sha256', time().$hash.$name);
$cnn = db__connect();
db__pushData($cnn, "table", array(
"id" => $tableId,
"state" => '1',
"name" => $name,
"threshold" => $threshold,
"created_by" => $hash,
"created_at" => date("Y-m-d H:i:s", time())
));
db__pushData($cnn, "user", array(
"user" => $hash,
"table" => $tableId,
"state" => '1',
"created_at" => date("Y-m-d H:i:s", time())
), array(
"user" => $hash,
"table" => $tableId
));
return json_encode(array(
"tableId" => $tableId
));

@ -0,0 +1,798 @@
<?php
include '/mnt/config/dbKeys/settlement.php';
include '/mnt/config/php/config.php';
/**database connection**/
$redis = new redis();
$redis->connect('redis',6379);
//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'];
if($servername == "log"){
$servername = $GLOBALS['g_db_log_serverName'];
$username = $GLOBALS['g_db_log_usrName'];
$password = $GLOBALS['g_db_log_psswd'];
$dbname = $GLOBALS['g_db_log_dbName'];
}elseif($servername == "yulu"){
$servername = $GLOBALS['g_db_log_serverName'];
$username = $GLOBALS['g_db_log_usrName'];
$password = $GLOBALS['g_db_log_psswd'];
$dbname = "yulu";
}
$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="",$clmnName3="",$value3="",$clmnName4="",$value4="")
{
$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'";
elseif($clmnName3=="") $sql = "SELECT COUNT(*) FROM `$table` where `$clmnName`='$value' AND `$clmnName2`='$value2'";
elseif($clmnName4=="") $sql = "SELECT COUNT(*) FROM `$table` where `$clmnName`='$value' AND `$clmnName2`='$value2' AND `$clmnName3`='$value3'";
else $sql = "SELECT COUNT(*) FROM `$table` where `$clmnName`='$value' AND `$clmnName2`='$value2' AND `$clmnName3`='$value3' AND `$clmnName4`='$value4'";
$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 array();}
$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);
}
function db__delData($conn, $table, $clmnName, $value)
{
$value=db__antisql($value);
$clmnName=db__antisql($clmnName);
$sql = "DELETE FROM `$table` WHERE `$clmnName` = '$value'";
$conn->query($sql);
}
//anti sql
function db__antisql($str)
{
return(str_ireplace("'","",$str));
}
/*****log******/
function yimian__log($table, $val, $index = "", $cnt = null){
if(!isset($cnt)) $cnt = db__connect("log");
if($index != "") db__pushData($cnt, $table, $val, $index);
else db__pushData($cnt, $table, $val);
}
/** get from address **/
function get_from(){
if($_SERVER['HTTP_REFERER']) return $_SERVER['HTTP_REFERER'];
elseif($_REQUEST['from']) return $_REQUEST['from'];
}
function get_from_domain(){
$str = str_replace("http://","",get_from());
$str = str_replace("https://","",$str);
$strdomain = explode("/",$str);
return $strdomain[0];
}
/*****curl*****/
function curl__post($url = '', $param) {
if(empty($url)) {
return false;
}
$o = "";
foreach ($param as $k => $v) {
$o .= "$k=".urlencode($v)."&" ;
}
$postUrl = $url;
$curlPost = substr($o,0,-1);
$ch = curl_init();//初始化curl
curl_setopt($ch, CURLOPT_URL,$postUrl);//抓取指定网页
curl_setopt($ch, CURLOPT_HEADER, 0);//设置header
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上
curl_setopt($ch, CURLOPT_POST, 1);//post提交方式
curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
$data = curl_exec($ch);//运行curl
curl_close($ch);
return $data;
}
/* get IP */
function get_ip(){
return getIp();
}
function getIp()
{
if (isset($_SERVER)) {
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$arr = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
foreach ($arr as $ip) {
$ip = trim($ip);
if ($ip != 'unknown') {
$realip = $ip;
break;
}
}
} else if (isset($_SERVER['HTTP_CLIENT_IP'])) {
$realip = $_SERVER['HTTP_CLIENT_IP'];
} else if (isset($_SERVER['REMOTE_ADDR'])) {
$realip = $_SERVER['REMOTE_ADDR'];
} else {
$realip = '0.0.0.0';
}
} else if (getenv('HTTP_X_FORWARDED_FOR')) {
$realip = getenv('HTTP_X_FORWARDED_FOR');
} else if (getenv('HTTP_CLIENT_IP')) {
$realip = getenv('HTTP_CLIENT_IP');
} else {
$realip = getenv('REMOTE_ADDR');
}
preg_match('/[\\d\\.]{7,15}/', $realip, $onlineip);
$realip = (!empty($onlineip[0]) ? $onlineip[0] : '0.0.0.0');
return $realip;
}
/* obs sdk */
require '/home/lib/huaweicloud-sdk-php-obs/vendor/autoload.php';
require '/home/lib/huaweicloud-sdk-php-obs/obs-autoloader.php';
use Obs\ObsClient;
/* obs get video */
function getVideo($path, $time = 120*60){
return obsSign($path, $time);
}
/* obs get img */
function getImg($path, $time = 300){
return str_replace('yimian-image.obs.cn-east-2.myhuaweicloud.com:443','image.yimian.xyz',obsSign($path, $time));
}
function obsSign($path, $expires = 300){
$obsClient = new ObsClient([
'key' => $GLOBALS['huawei_AK'],
'secret' => $GLOBALS['huawei_SK'],
'endpoint' => "https://obs.cn-east-2.myhuaweicloud.com",
]);
$resp = $obsClient->createSignedUrl( [
'Method' => 'GET',
'Bucket' => 'yimian-image',
'Key' => $path,
'Expires' => $expires
] );
$obsClient -> close();
return $resp['SignedUrl'];
}
function getImgsInfo($type, $isFast = false){
$obsClient = new ObsClient([
'key' => $GLOBALS['huawei_AK'],
'secret' => $GLOBALS['huawei_SK'],
'endpoint' => "https://obs.cn-east-2.myhuaweicloud.com",
]);
$resp = $obsClient -> listObjects([
'Bucket' => 'yimian-image',
'MaxKeys' => 10000,
'Prefix' => $type.'/',
'Marker' => $type.'/img'
]);
//ini_set("pcre.backtrack_limit" , -1); ini_set("pcre.recursion_limit" , -1); ini_set("memory_limit" , "1024M");
foreach($resp['Contents'] as $index => $val){
$str .= $val['Key'].' ';
};
$obsClient -> close();
preg_match_all('/img_(\S*?)_(\d{2,4})x(\d{2,4})_(\S*?)_(\S*?)_(\S*?).(jpe?g|png|gif|svg)\b/', $str, $arr);
//echo var_dump($str);
return $arr;
}
/*****gugu*****/
function yimian__gugu($body){
$body = iconv("UTF-8","gbk//TRANSLIT",$body);
$url = "http://open.memobird.cn/home/printpaper";
return curl__post($url, array("ak" => $GLOBALS['ggj_ak'], "userID" => $GLOBALS['ggj_userID'], "memobirdID" => $GLOBALS['ggj_memobirdID'], "printcontent" => "T:".base64_encode($body)."", "timestamp" => "".time().""));
}
function gugu__send($ak, $userID, $memobirdID, $body){
$body = iconv("UTF-8","gbk//TRANSLIT",$body);
$url = "http://open.memobird.cn/home/printpaper";
return curl__post($url, array("ak" => $ak, "userID" => $userID, "memobirdID" => $memobirdID, "printcontent" => "T:".base64_encode($body)."", "timestamp" => "".time().""));
}
/** function for mail **/
function yimian__mail($to, $subject, $body, $from){
if($from == "") $from = "IoTcat 呓喵酱";
if($body == "") $body = "额(⊙﹏⊙) 未找到指定的邮件内容耶( •̀ ω •́ )y<br/><br/>更多信息请咨询<a href = 'https://iotcat.me'>IoTcat</a>期待你的回应啦~";
if($subject == "") $subject = "来自IoTcat的一声问候~";
$data = array(
'fromName' => $from, // 发件人名称
'from' => "admin@iotcat.xyz", // 发件地址
'to' => $to, // 收件地址
'replyTo' => "i@iotcat.me", // 回信地址
'subject' => $subject,
'html' => $body
);
// 当前请求区域
// 杭州
// API地址
$data['api'] = 'https://dm.aliyuncs.com/';
// API版本号
$data['version'] = '2015-11-23';
// 机房信息
$data['region'] = 'cn-hangzhou';
// AccessKeyId
$data['accessid'] = $GLOBALS['aym_AccessKey'];
// AccessKeySecret
$data['accesssecret'] = $GLOBALS['aym_SecretKey'];
// 是否成功
return aliyun($data);
}
//mail alliyun api
function aliyun($param)
{
// 重新组合为阿里云所使用的参数
$data = array(
'Action' => 'SingleSendMail', // 操作接口名
'AccountName' => $param['from'], // 发件地址
'ReplyToAddress' => "true", // 回信地址
'AddressType' => 1, // 地址类型
'ToAddress' => $param['to'], // 收件地址
'FromAlias' => $param['fromName'], // 发件人名称
'Subject' => $param['subject'], // 邮件标题
'HtmlBody' => $param['html'], // 邮件内容
'Format' => 'JSON', // 返回JSON
'Version' => $param['version'], // API版本号
'AccessKeyId' => $param['accessid'], // Access Key ID
'SignatureMethod' => 'HMAC-SHA1', // 签名方式
'Timestamp' => gmdate('Y-m-d\TH:i:s\Z'), // 请求时间
'SignatureVersion' => '1.0', // 签名算法版本
'SignatureNonce' => md5(time()), // 唯一随机数
'RegionId' => $param['region'] // 机房信息
);
// 请求签名
$data['Signature'] = sign($data, $param['accesssecret']);
// 初始化Curl
$ch = curl_init();
// 设置为POST请求
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
// 请求地址
curl_setopt($ch, CURLOPT_URL, $param['api']);
// 返回数据
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
// 提交参数
curl_setopt($ch, CURLOPT_POSTFIELDS, getPostHttpBody($data));
// 关闭ssl验证
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
// 执行请求
$result = curl_exec($ch);
// 获取错误代码
$errno = curl_errno($ch);
// 获取错误信息
$error = curl_error($ch);
// 获取返回状态码
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
// 关闭请求
curl_close($ch);
// 成功标识
$flag = TRUE;
// 如果开启了Debug
if (1) {
// 记录时间
$log = '[Aliyun] ' . date('Y-m-d H:i:s') . ': ' . PHP_EOL;
// 如果失败
if ( $errno ) {
// 设置失败
$flag = FALSE;
$log .= '邮件发送失败, 错误代码:' . $errno . ',错误提示: ' . $error . PHP_EOL;
}
// 如果失败
if ( 400 <= $httpCode ) {
// 设置失败
$flag = FALSE;
// 尝试转换json
if ( $json = json_decode($result) ) {
$log .= '邮件发送失败,错误代码:' . $json->Code . ',错误提示:' . $json->Message . PHP_EOL;
} else {
$log .= '邮件发送失败, 请求返回HTTP Code:' . $httpCode . PHP_EOL;
}
}
// 记录返回值
$log .= '邮件发送返回数据:' . serialize($result) . PHP_EOL;
// 写入文件
}
yimian__log("log_mail",array("timestamp" => date('Y-m-d H:i:s', time()), "to_" => $param['to'], "from_" => $param['fromName'], "subject" => $param['subject'], "body" => $param['html'], "success" => (($flag)?1:0), "return_" => $log));
// 返回结果
//echo $log;
return $flag;
}
/**
* 阿里云签名
*
* @static
* @access private
*
* @param array $param 签名参数
* @param string $accesssecret 秘钥
*
* @return string
*/
function sign($param, $accesssecret)
{
// 参数排序
ksort($param);
// 组合基础
$stringToSign = 'POST&' . percentEncode('/') . '&';
// 临时变量
$tmp = '';
// 循环参数列表
foreach ( $param as $k => $v ) {
// 组合参数
$tmp .= '&' . percentEncode($k) . '=' . percentEncode($v);
}
// 去除最后一个&
$tmp = trim($tmp, '&');
// 组合签名参数
$stringToSign = $stringToSign . percentEncode($tmp);
// 数据签名
$signature = base64_encode(hash_hmac('sha1', $stringToSign, $accesssecret . '&', TRUE));
// 返回签名
return $signature;
}
/**
* 阿里云签名编码转换
*
* @static
* @access private
*
* @param string $val 要转换的编码
*
* @return string|string[]|null
*/
function percentEncode($val)
{
// URL编码
$res = urlencode($val);
// 加号转换为%20
$res = preg_replace('/\+/', '%20', $res);
// 星号转换为%2A
$res = preg_replace('/\*/', '%2A', $res);
// %7E转换为~
$res = preg_replace('/%7E/', '~', $res);
return $res;
}
/**
* 阿里云请求参数组合
*
* @static
* @access private
*
* @param array $param 发送参数
*
* @return bool|string
*/
function getPostHttpBody($param)
{
// 空字符串
$str = "";
// 循环参数
foreach ( $param as $k => $v ) {
// 组合参数
$str .= $k . '=' . urlencode($v) . '&';
}
// 去除第一个&
return substr($str, 0, -1);
}
/* sms */
require __DIR__ . "/../../lib/qcloudsms/src/index.php";
use Qcloud\Sms\SmsSingleSender;
use Qcloud\Sms\SmsMultiSender;
use Qcloud\Sms\SmsVoiceVerifyCodeSender;
use Qcloud\Sms\SmsVoicePromptSender;
use Qcloud\Sms\SmsStatusPuller;
use Qcloud\Sms\SmsMobileStatusPuller;
use Qcloud\Sms\VoiceFileUploader;
use Qcloud\Sms\FileVoiceSender;
use Qcloud\Sms\TtsVoiceSender;
function yimian__sms($to, $tpl, $msg1, $msg2, $msg3){
$msg = array();
if($tpl == 3) array_push($msg, $msg1, $msg2, $msg3);
else array_push($msg, $msg1, $msg2);
$appid = $GLOBALS['sms_appid'];
$appkey = $GLOBALS['sms_appkey'];
$smsSign = $GLOBALS['sms_smsSign'];
if($tpl == 1) $templateId = 287129; /*由于{1},本站{2}。给您带来不便深表歉意!*/
if($tpl == 2) $templateId = 300726; /*您好!您收到一条来自{1}的消息,内容是{2}。感谢您使用本站的服务!*/
if($tpl == 3) $templateId = 205311; /*您{1}的{2}为{3},请于5分钟内填写。如非本人操作,请忽略本短信。祝好!*/
if($tpl == 4) $templateId = 244004; /*{1}已解决,本站{2}服务已恢复!给您带来不便深表歉意!特此告知!*/
if($tpl == 5) $templateId = 300722; /*你好呀,你收到了一条来自访客{1}的评论,内容是{2}。感谢你使用本站的服务啦 ~*/
try {
$ssender = new SmsSingleSender($appid, $appkey);
$params = $msg;
$result = $ssender->sendWithParam("86", $to, $templateId,
$params, $smsSign, "", ""); /* 签名参数未提供或者为空时,会使用默认签名发送短信*/
$rsp = json_decode($result);
echo $result;
} catch(\Exception $e) {
echo var_dump($e);
}
}
/* cp-acc */
function getUsers($cnn, $tableId){
$res = db__getData($cnn, 'user', 'table', $tableId, 'state', '1');
$arr = array();
foreach($res as $item){
array_push($arr, $item['user']);
}
return $arr;
}
function getItems($cnn, $tableId){
return db__getData($cnn, "account", "table", $tableId);
}
function getTableInfo($cnn, $tableId){
$res = db__getData($cnn, "table", "table", $tableId);
return $res[0];
}
function getTableData($cnn, $tableId){
$o = getTableInfo($cnn, $tableId);
$o['users'] = getUsers($cnn, $tableId);
$o['items'] = getItems($cnn, $tableId);
return $o;
}
function getTableDataByUsers($cnn, $tableId){
$o = getTableData($cnn, $tableId);
$o['itemsByUser'] = array();
foreach($o['users'] as $user){
$arr = array();
foreach($o['items'] as $item){
if($item['user'] == $user){
array_push($arr, $item);
}
}
array_push($o['itemsByUser'], $arr);
}
return $o;
}
function getTotals($tableData){
$data = $tableData;
$data['total'] = 0;
foreach($data['items'] as $index=>$item){
$data['total'] += $item['value'];
$data['items'][$index]['timestamp'] = strtotime($item['created_at']);
}
$data['actualTotals'] = array();
$data['virtualTotals'] = array();
foreach($data['users'] as $user){
$actualTotal = 0;
$virtualTotal = 0;
foreach($data['items'] as $item){
if($item['state'] == 1){
$actualTotal += $item['value'];
}
$virtualTotal += $item['value'];
}
$data['actualTotals'][$user] = $actualTotal;
$data['virtualTotals'][$user] = $virtualTotal;
}
return $data;
}
function getAverage($tableData){
$tableData['average'] = $tableData['total'] / count($tableData['users']);
return $tableData;
}
function getUsersInfo($tableData){
$auth = db__connect("","","","auth");
$tableData['usersName'] = array();
foreach($tableData['users'] as $user){
array_push($tableData['usersName'], db__getData($auth, "account", "hash", $user)[0]['nickname']);
}
return $tableData;
}
function getFinalData($cnn, $tableId){
$d = getTableDataByUsers($cnn, $tableId);
$o = getTotals($d);
$o = getAverage($o);
$o = getUsersInfo($o);
return $o;
}
function getThreshold($cnn, $tableId){
$res = db__getData($cnn, "table", "id", $tableId);
return $res[0]['threshold'];
}
function checkBalance($data, $threshold){
foreach($data['virtualTotals'] as $item){
if($item - $data['average'] < $threshold && $item - $data['average'] > -$threshold){
}else{
return false;
}
}
return true;
}
function setBalance($first, $last, $threshold, $tableId, $cnn){
$itemIdFirst = hash('sha256', time().$tableId.$first);
$itemIdLast = hash('sha256', time().$tableId.$last);
$time = time();
db__pushData($cnn, "account", array(
"id" => $itemIdFirst,
"table" => $tableId,
"user" => $first,
"type" => 'innerF',
"state" => '0',
"value" => $threshold,
"created_at" => date("Y-m-d H:i:s", $time),
"comments"=>$last
));
db__pushData($cnn, "account", array(
"id" => $itemIdLast,
"table" => $tableId,
"user" => $last,
"type" => 'innerT',
"state" => '0',
"value" => -$threshold,
"created_at" => date("Y-m-d H:i:s", $time),
"comments"=>$first
));
$auth = db__connect("","","","auth");
$firstData = db__getData($auth, "account", "hash", $first)[0];
$lastData = db__getData($auth, "account", "hash", $last)[0];
yimian__mail($firstData['email'], "CP-ACC消息: 您需要给".$lastData['nickname'].$threshold."磅/元", "亲爱的".$firstData['nickname'].":
根据系统的计算,您需要给".$lastData['nickname']."(".$lastData['email'].")".$threshold."磅/元,以保持大家的公共支出相对公平。请在转账后提醒对方从网站或邮件中确认您的支出。您可以通过<a href='https://cp-acc.yimian.xyz/'>CP-ACC网站</a>查看具体账目细节。如有任何疑问,请联系站长呓喵酱(i@iotcat.me)。
感谢您使用本站服务,祝您生活愉悦!
呓喵酱(@iotcat)", "CP-ACC");
yimian__mail($lastData['email'], "CP-ACC消息: 您将从".$firstData['nickname']."收到".$threshold."磅/元", "亲爱的".$lastData['nickname'].":
根据系统的计算,您将从".$lastData['nickname']."(".$lastData['email'].")"."收取".$threshold."磅/元,以保持大家的公共支出相对公平。请在收到对方转账后点击下方确认链接或登入<a href='https://cp-acc.yimian.xyz/'>CP-ACC网站</a>进行确认。您可以通过<a href='https://cp-acc.yimian.xyz/'>CP-ACC网站</a>查看具体账目细节。如有任何疑问,请联系站长呓喵酱(i@iotcat.me)。
确认链接: <a href='https://cp-acc.yimian.xyz/api/confirmBalance.php?first=".$itemIdFirst."&last=".$itemIdLast."'>https://cp-acc.yimian.xyz/api/confirmBalance.php?first=".$itemIdFirst."&last=".$itemIdLast."</a>
感谢您使用本站服务,祝您生活愉悦!
呓喵酱(@iotcat)", "CP-ACC");
}

@ -0,0 +1,21 @@
<?php
include './functions.php';
header("Content-type:application/json");
$hash = $_REQUEST['hash'];
if(!isset($hash)) die();
$cnn = connect();
$res = db__getData($cnn, "user", "user", $hash, "state", '1');
$o = [];
foreach($res as $item){
array_push($o, getFinalData($cnn, $item['table']));
}
echo json_encode($o);

@ -0,0 +1,24 @@
<?php
include './functions.php';
$hash = $_REQUEST['hash'];
$tableId = $_REQUEST['tableId'];
if(!isset($hash) || !isset($tableId)) die();
$cnn = db__connect();
db__pushData($cnn, "user", array(
"user" => $hash,
"table" => $tableId,
"state" => '1',
"created_at" => date("Y-m-d H:i:s", time())
), array(
"user" => $hash,
"table" => $tableId
));
echo '<script>alert("加入成功!");window.location.href="../"</script>';

@ -0,0 +1,52 @@
<?php
include './functions.php';
$url = $_REQUEST['url'];
$passby = $_REQUEST['passby'];
if(!isset($hash) || !isset($passby)) die();
$passby = json_decode(base64_decode($passby), true);
$tableId = $passby['tableId'];
$value = $passby['value'];
$hash = $passby['hash'];
$itemId = hash('sha256', time().$hash.$tableId);
$cnn = db__connect();
db__pushData($cnn, "account", array(
"id" => $itemId,
"table" => $tableId,
"user" => $hash,
"type" => 'external',
"state" => '1',
"value" => $value,
"url" => $url,
"created_at" => date("Y-m-d H:i:s", time())
));
$data = getFinalData($cnn, $tableId);
$threshold = getThreshold($cnn, $tableId);
while(!checkBalance($data, $threshold)){
asort($data['virtualTotals']);
reset($data['virtualTotals']);
$first = key($data['virtualTotals']);
end($data['virtualTotals']);
$last = key($data['virtualTotals']);
if($data['average'] - $data['virtualTotals'][$first] > $threshold){
setBalance($first, $last, $threshold, $tableId, $cnn);
}
$data = getFinalData($cnn, $tableId);
}
header("Location: https://cp-acc.yimian.xyz/");

@ -0,0 +1,22 @@
<?php
include './functions.php';
$tableId = $_REQUEST['tableId'];
$name = $_REQUEST['name'];
$threshold = $_REQUEST['threshold'];
if(!isset($tableId) || !isset($name) || !isset($threshold)) die();
$cnn = db__connect();
db__pushData($cnn, "table", array(
"id" => $tableId,
"state" => '1',
"name" => $name,
"threshold" => $threshold,
"created_by" => $hash,
"created_at" => date("Y-m-d H:i:s", time())
), array(
"id" => $tableId
));

1579
css/animate.css vendored

File diff suppressed because it is too large Load Diff

8869
css/bootstrap.min.css vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

12
css/swiper.min.css vendored

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1019 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1019 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1019 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 401.998 401.998" style="enable-background:new 0 0 401.998 401.998;" xml:space="preserve">
<g>
<g>
<path d="M73.092,164.452h255.813c4.949,0,9.233-1.807,12.848-5.424c3.613-3.616,5.427-7.898,5.427-12.847 c0-4.949-1.813-9.229-5.427-12.85L213.846,5.424C210.232,1.812,205.951,0,200.999,0s-9.233,1.812-12.85,5.424L60.242,133.331 c-3.617,3.617-5.424,7.901-5.424,12.85c0,4.948,1.807,9.231,5.424,12.847C63.863,162.645,68.144,164.452,73.092,164.452z" fill="#919191"/>
<path d="M328.905,237.549H73.092c-4.952,0-9.233,1.808-12.85,5.421c-3.617,3.617-5.424,7.898-5.424,12.847 c0,4.949,1.807,9.233,5.424,12.848L188.149,396.57c3.621,3.617,7.902,5.428,12.85,5.428s9.233-1.811,12.847-5.428l127.907-127.906 c3.613-3.614,5.427-7.898,5.427-12.848c0-4.948-1.813-9.229-5.427-12.847C338.139,239.353,333.854,237.549,328.905,237.549z" fill="#919191"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1,577 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
<title>CP Accountant</title>
<!-- Google font file. If you want you can change. -->
<link href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,900" rel="stylesheet">
<!-- Fontawesome font file css -->
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<!-- Animate css file for css3 animations. for more : https://daneden.github.io/animate.css -->
<!-- Only use animate action. If you dont use animation, you don't have to add.-->
<link rel="stylesheet" type="text/css" href="https://cdn.yimian.xyz/smart-settlement/css/animate.css">
<link rel="stylesheet" type="text/css" href="https://cdn.yimian.xyz/smart-settlement/css/cryptocoins.css">
<link rel="stylesheet" type="text/css" href="https://cdn.yimian.xyz/smart-settlement/plugins/c3-chart/c3.css">
<!-- Template global css file. Requared all pages -->
<link rel="stylesheet" type="text/css" href="https://cdn.yimian.xyz/smart-settlement/css/global.style.css">
<!-- Swiper slider css file -->
<link rel="stylesheet" href="https://cdn.yimian.xyz/smart-settlement/css/swiper.min.css">
<!--turbo slider plugin css file -->
<link rel="stylesheet" type="text/css" href="https://cdn.yimian.xyz/smart-settlement/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.yimian.xyz/smart-settlement/plugins/turbo-slider/turbo.css">
<link rel="stylesheet" type="text/css" href="https://cdn.yimian.xyz/shaky/shaky.css">
<script>var block_aplayer = true;</script>
<script type="text/javascript" src="https://cdn.yimian.xyz/ushio-js/ushio-head.min.js"></script>
<script type="text/javascript">page.auth = ['email', 'nickname'];</script>
</head>
<body>
<div class="wrapper ">
<div class="nav-menu">
<nav class="menu">
<!-- Menu navigation start -->
<div class="nav-container">
<ul class="main-menu">
<li class="active">
<a href="index.html"><img src="https://cdn.yimian.xyz/smart-settlement/img/content/icons/1.png" alt=""><strong class="special">Dashboard</strong> </a>
</li>
<li class="">
<a href="records.html"><img src="https://cdn.yimian.xyz/smart-settlement/img/content/icons/6.png" alt=""><strong class="special">History Payment</strong> </a>
</li>
<li class="">
<a href="setTable.html"><img src="img/content/icons/11.png" alt=""><strong>Settings</strong> </a>
</li>
<li class="">
<a href="https://login.yimian.xyz/logout.html" data-loader="show"><img src="https://cdn.yimian.xyz/smart-settlement/img/content/icons/7.png" alt=""><strong>Log out</strong></a>
</li>
</ul>
</div>
<!-- Menu navigation end -->
</nav>
</div>
<div class="wrapper-inline">
<!-- Header area start -->
<header class="no-background"> <!-- extra class no-background -->
<div class="search-button" data-search="open">
<img id="no-icon" src="https://cdn.yimian.xyz/smart-settlement/img/content/notification-no.png" class="not-icon1" alt="">
<img id="no-icon2" src="https://cdn.yimian.xyz/smart-settlement/img/content/notification2-no.png" class="not-icon2" alt="">
</div>
<div class="navi-menu-button">
<em></em>
<em></em>
<em></em>
</div>
</header>
<!-- Header area end -->
<!--NOTIFICATION BOX CONTENT START-->
<div class="search-form">
<span class="close-search-form" data-search="close"><i class="fa fa-times"></i> </span>
<form>
<div class="search-input">
<br/>
</div>
</form>
<ul class="notification-list list-unstyled" id="no-content">
</ul>
</div>
<!--NOTIFICATION BOX CONTENT END-->
<!-- Page content start -->
<main class="margin mt-0">
<div class="dash-balance">
<div class="dash-content relative">
<h3 class="w-text">ERP for CP Home</h3>
<div class="notification">
<h3 class="w-text" id="usr">xxx</h3>
</div>
</div>
</div>
<section class="bal-section container">
<div class="balance-card mb-15">
<div class="d-flex align-items-center">
<div class="d-flex flex-grow">
<div class="mr-auto">
<h1 class="b-val"> £<span id="week-avg"></span> </h1>
<p class="g-text mb-10">Weekly Payment</p>
<div class="badge badge-pill" id="week-avg-rate"> 43.55% <i style="color:red;" class="fa fa-arrow-down ml-10"></i></div>
</div>
<div class="ml-auto align-self-end">
<div id="sparkline1"></div>
</div>
</div>
</div>
</div>
<div class="resources-card-wrapper">
<div class="resources-card mr-10">
<div class="d-flex flex-column flex-md-row">
<i class="fa fa-shield text-primary"></i>
<div class="d-flex flex-column ml-md-2">
<p class="text-muted mb-10 font-weight-medium">Total Payment</p>
<div class="progress">
<div class="progress-bar bg-primary" id="total-bar" role="progressbar" style="width: 97%"></div>
</div>
<h4 class="mt-10 mb-0">£<span id="total"></span> </h4>
</div>
</div>
</div>
<div class="resources-card ml-10">
<div class="d-flex flex-column flex-md-row">
<i class="fa fa fa-shopping-cart txt-green"></i>
<div class="d-flex flex-column ml-md-2">
<p class="text-muted mb-10 font-weight-medium">Your Payment</p>
<div class="progress">
<div class="progress-bar bg-success" id="total-usr-bar" role="progressbar" style="width: 67%"></div>
</div>
<h4 class="mt-10 mb-0">£<span id="total-usr"></span> </h4>
</div>
</div>
</div>
</div>
</section>
<br/>
<section>
<div class="content">
<div class="wallet-address">
<h4 class="w-text mt-0">Report New Payment</h4>
<div class="form-row-group with-icons">
<div class="form-row no-padding">
<i>£</i>
<input type="text" id="aaa" class="form-element">
</div>
</div>
<h4><a id="submit-a" href="#">Submit</a></h4>
<p class="g-text mb-0">Be Careful when Input..</p>
</div>
</div>
</section>
<section class="container">
<div class="content">
<h4 class="title-main">Daily Payment Trend</h4>
<div class="c-panel pl-0">
<div class="row align-items-center">
<div class="col-12">
<div class="advertising-wrapper">
<div id="barAreaGraph" ></div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="container">
<div class="content">
<h4 class="title-main">Bill Split</h4>
<div class="c-panel">
<div class="row align-items-center">
<div class="col-12 col-sm-6">
<div class="advertising-wrapper">
<div id="advertising" class="chart-height-sm"></div>
<h3 class="info-label"><span>Variance</span> <span id="a-balance"></span></h3>
</div>
</div>
<div class="col-12 col-sm-6">
<div class="split-list">
<ul class="adv-stats">
<li>
<i class="fa fa-circle-o"></i>
mingran <span id="a-mingran">22%</span>
</li>
<li>
<i class="fa fa-circle-o "></i>
boyao <span id="a-boyao">11%</span>
</li>
<li>
<i class="fa fa-circle-o"></i>
yimian <span id="a-yimian">40%</span>
</li>
<li>
<i class="fa fa-circle-o"></i>
xiaotian <span id="a-xiaotian">17%</span>
</li>
<li>
<i class="fa fa-circle-o"></i>
hao <span id="a-hao">10%</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="container">
<h4 class="title-main">Recent Transactions</h4>
<ul class="transaction-list list-unstyled" id="account-events">
</ul>
</section>
<footer>
<div class="container">
<ul>
<li><a id="ushio-blog" href="https://www.eee.dog"><i class="fa fa-home"></i></a></li>
<li><a href="https://github.com/iotcat"><i class="fa fa-github"></i></a></li>
<li><a href="mailto:i@yimian.xyz"><i class="fa fa-envelope"></i></a></li>
<li><a href="https://www.eee.dog/feed"><i class="fa fa-rss"></i></a></li>
</ul>
<p>© 2018-<script type="text/javascript">document.write(new Date().getFullYear());</script> Made with <span class="shaky"><i style="color:red;" class="fa fa-heart"></i></span> by <a id="ushio-tome" href="https://iotcat.me">iotcat</a></p>
</div>
</footer>
</main>
<!-- Page content end -->
</div>
</div>
<!--Page loader DOM Elements. Requared all pages-->
<div class="sweet-loader">
<div class="box">
<div class="circle1"></div>
<div class="circle2"></div>
<div class="circle3"></div>
</div>
</div>
<script type="text/javascript" src="https://cdn.yimian.xyz/ushio-js/ushio-footer.min.js"></script>
<!-- JQuery library file. requared all pages -->
<script src="https://cdn.yimian.xyz/smart-settlement/js/jquery-3.2.1.min.js"></script>
<!-- Swiper JS -->
<script src="https://cdn.yimian.xyz/smart-settlement/js/swiper.min.js"></script>
<!-- Initialize Swiper -->
<!-- Flot Charts -->
<script src="https://cdn.yimian.xyz/smart-settlement/plugins/c3-chart/c3.min.js"></script>
<script src="https://cdn.yimian.xyz/smart-settlement/plugins/c3-chart/d3.min.js"></script>
<script src="https://cdn.yimian.xyz/smart-settlement/plugins/c3-chart/c3.custom.js"></script>
<!-- Flot Charts -->
<script src="https://cdn.yimian.xyz/smart-settlement/plugins/flot/jquery.flot.min.js"></script>
<script src="https://cdn.yimian.xyz/smart-settlement/plugins/flot/jquery.flot.time.min.js"></script>
<script src="https://cdn.yimian.xyz/smart-settlement/plugins/flot/jquery.flot.pie.min.js"></script>
<script src="https://cdn.yimian.xyz/smart-settlement/plugins/flot/jquery.flot.tooltip.min.js"></script>
<script src="https://cdn.yimian.xyz/smart-settlement/plugins/flot/jquery.flot.resize.min.js"></script>
<!-- Sparkline-->
<script src="https://cdn.yimian.xyz/smart-settlement/plugins/jquery-sparkline/jquery.sparkline.js"></script>
<!-- Template global script file. requared all pages -->
<script src="https://cdn.yimian.xyz/smart-settlement/js/app-charts.js"></script>
<script src="https://cdn.yimian.xyz/smart-settlement/js/global.script.js"></script>
<script type="text/javascript">
session.onload(function(){
if(page.params.hasOwnProperty('type') && page.params.type == 'join'){
window.location.href="./api/joinTable.php?hash="+session.get('hash')+'&tableId='+page.params.tableId;
return;
}
$.get('./api/getData.php?hash='+session.get('hash'), function(data){
if(!data.length){
alert('请先创建一个公共账户!');
window.location.href="./setTable.html";
return;
}
window.data = data;
$('#usr').html('Hi~ '+session.get('nickname'));
$('#total').html(Number(data.total));
$('#total-usr').html(Number(data['actualTotals'][session.get('hash')]));
$('#total-usr-bar').css('width', (data['actualTotals'][session.get('hash')] / data.average)*100+'%');
var lastWeekTotal, lastSecodeWeekTotal;
data.items.foreach(function(item)=>{
if(item.tiemstamp > new Date().valueOf() - 7*24*60*1000){
lastWeekTotal += item.value;
}else if(item.tiemstamp > new Date().valueOf() - 14*24*60*1000){
lastSecodeWeekTotal += item.value;
}
});
$('#week-avg').html(Number(lastWeekTotal/7).toFixed(2));
$('#total-bar').css('width', (data['actualTotals'][session.get('hash')] / lastWeekTotal)*100+'%');
if(lastWeekTotal > lastSecodeWeekTotal) $('#week-avg-rate').html(((lastWeekTotal - lastSecodeWeekTotal)/lastSecodeWeekTotal).toFixed(2)+'% <i style="color:red;" class="fa fa-arrow-up ml-10"></i>');
if(lastSecodeWeekTotal < lastSecodeWeekTotal) $('#week-avg-rate').html(((lastSecodeWeekTotal - lastWeekTotal)/lastSecodeWeekTotal).toFixed(2)+'% <i style="color:green;" class="fa fa-arrow-down ml-10"></i>');
var show = [];
for(var i = data['items'].length; i > data['items'].length-10; i --){
if(data['items'][i]['value'] > 0 && data['items'][i]['type'] != 'innerT')
show.push(data['items'][i]);
}
var s = '';
show.forEach((i)=>{
s += `
<li>
<div class="d-flex align-items-center justify-content-between">
<div class="d-flex align-items-center">
<img class="img-xs" src="https://cdn.yimian.xyz/smart-settlement/img/content/coin`;
if(i.type == "external") s += 3;
if(i.type == "innerF" && !i.state) s += 4;
if(i.type == "innerF" && i.state) s += 5;
s += `.png" alt="coin image">
<div class="ml-10">
<h4 class="coin-name">`;
s += i.type;
if(i.type == "external") s += ' - ' + data.usersName[i.user]
if(i.type == "innerF" && !i.state) s += ' - ' + data.usersName[i.user] + ' -> ' + data.usersName[i.comments];
if(i.type == "innerF" && i.state) s += ' - ' + data.usersName[i.user] + ' 👍 ' + data.usersName[i.comments];
s += `</h4>
<small class="text-muted">`;
s += i.created_at;
s += `</small>
</div>
</div>
<div>
`;
if(i.type == 'external') s += `<small class="d-block mb-0 txt-red">£`+(i.value.toFixed(2) + `</small>`;
s += `
<small class="text-muted d-block">£`;
s += Number(i.value);
s += `</small>
</div>
</div>
</li>
`;
});
$('#account-events').html(s);
var userNotice = [];
data['itemsByUser'][session.get('hash')].forEach((item)=>{
if(!item.state){
userNotice.push(item);
}
});
function notice(){
var s = '';
if(!userNotice.length){
s += `
<li>
<div class="d-flex align-items-center justify-content-between">
<div class="d-flex align-items-center">
<div class="">
<h5 class="coin-name">You have NO notifications!!</h5>
</div>
</div>
<div>
<a href=""></a>
</div>
</div>
</li>`;
$('#no-content').html(s);
$("#no-icon").attr("src", 'https://cdn.yimian.xyz/smart-settlement/img/content/notification-no.png');
$("#no-icon2").attr("src", 'https://cdn.yimian.xyz/smart-settlement/img/content/notification2-no.png');
return;
}
s += `
<li>
<div class="d-flex align-items-center justify-content-between">
<div class="d-flex align-items-center">
<div class="">
<h5 class="coin-name">Your last `;
s += userNotice.length;
s += ` notifications</h5>
</div>
</div>
<div>
<a href=""></a>
</div>
</div>
</li>`;
userNotice.forEach(function(item){
s += `
<li>
<div class="d-flex align-items-center justify-content-between">
<div class="d-flex align-items-center">
<div class="notice-icon `;
if(item.value < 0) s += `available`;
if(item.value > 0) s += `away`;
s += `">
<i class="fa fa-`;
if(item.value < 0) s += `check`;
if(item.value > 0) s += `clock-o`;
s += `"></i>
</div>
<div class="ml-10">
<h4 class="coin-name">`;
if(item.value < 0) s += `You will Get £50 from `+ data.usersName[item.comments] + ` <button style="color: green;" onClick="javascript:confirm(`+item.created_at+`);">Confirm to Recived</button>`;
if(item.value > 0) s += `Please Give £50 to `+ data.usersName[item.comments];
s += `</h4>
<small class="text-muted">`;
s += timeago(new Date(item.created_at.replace(/-/g, '/')).getTime());
s += `</small>
</div>
</div>
</div>
</li>`;
});
s += `
<li>
<div class="d-flex align-items-center justify-content-between">
<div class="d-flex align-items-center">
<a href="" class="text-muted">The end of all notifications</a>
</div>
</div>
</li>`;
$('#no-content').html(s);
$("#no-icon").attr("src", 'https://cdn.yimian.xyz/smart-settlement/img/content/notification-yes.png');
$("#no-icon2").attr("src", 'https://cdn.yimian.xyz/smart-settlement/img/content/notification2-yes.png');
};
notice();
});
});
$("#aaa").bind("input propertychange",function(event){
console.log($("#aaa").val());
$("#aaa").val(clearNoNum($("#aaa").val()))
});
$("#submit-a").click(function(){
if(!$('#aaa').val()) {
alert('illegal input');
return;
}
window.location.href='https://imgbed.yimian.xyz/imgbed/api.html?redirect=https://cp-acc.yimian.xyz/api/newItem.php&passby='+btoa(JSON.stringify({
tableId: data.id,
hash: session.get('hash'),
value: $("#aaa").val()
}));
});
/* notification func */
function timeago(dateTimeStamp){ //dateTimeStamp是一个时间毫秒,注意时间戳是秒的形式,在这个毫秒的基础上除以1000,就是十位数的时间戳。13位数的都是时间毫秒。
var minute = 1000 * 60; //把分,时,天,周,半个月,一个月用毫秒表示
var hour = minute * 60;
var day = hour * 24;
var week = day * 7;
var halfamonth = day * 15;
var month = day * 30;
var now = new Date().getTime(); //获取当前时间毫秒
var diffValue = now - dateTimeStamp;//时间差
if(diffValue < 0){
return;
}
var minC = diffValue/minute; //计算时间差的分,时,天,周,月
var hourC = diffValue/hour;
var dayC = diffValue/day;
var weekC = diffValue/week;
var monthC = diffValue/month;
if(monthC >= 1 && monthC <= 3){
result = " " + parseInt(monthC) + "month ago"
}else if(weekC >= 1 && weekC <= 3){
result = " " + parseInt(weekC) + "week ago"
}else if(dayC >= 1 && dayC <= 6){
result = " " + parseInt(dayC) + "day ago"
}else if(hourC >= 1 && hourC <= 23){
result = " " + parseInt(hourC) + "hours ago"
}else if(minC >= 1 && minC <= 59){
result =" " + parseInt(minC) + "minutes ago"
}else if(diffValue >= 0 && diffValue <= minute){
result = "just now"
}else {
var datetime = new Date();
datetime.setTime(dateTimeStamp);
var Nyear = datetime.getFullYear();
var Nmonth = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
var Ndate = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
var Nhour = datetime.getHours() < 10 ? "0" + datetime.getHours() : datetime.getHours();
var Nminute = datetime.getMinutes() < 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
var Nsecond = datetime.getSeconds() < 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
result = Nyear + "-" + Nmonth + "-" + Ndate
}
return result;
}
function confirm(created_at){
var arr = [];
data['items'].forEach((item)=>{
if(item.created_at == created_at){
arr.push(item.id);
}
});
$.post('https://cp-acc.yimian.xyz/api/confirmBalance.php&first='+arr[0]+'&last='+arr[1], function(res){
notice();
});
}
</script>
<script language="JavaScript" type="text/javascript">
function clearNoNum(value){
value = value.replace(/[^\d.]/g,""); //清除“数字”和“.”以外的字符
value = value.replace(/^\./g,""); //验证第一个字符是数字而不是.
value = value.replace(/\.{2,}/g,"."); //只保留第一个. 清除多余的.
value = value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
return value;
}
</script>
</body>
</html>

@ -0,0 +1,177 @@
var $danger = "#D66061";
var $yellow = "#ffee00";
// Sparkline Graphs
$(function () {
$('#projects').sparkline([320,250,400,380,280,320,220,385,450], {
type: 'line',
lineWidth: 3,
fillColor: false,
lineColor: '#058DC7',
spotColor: '#e13f3d',
minSpotColor: '#50B432',
maxSpotColor: '#f7b53c',
highlightSpotColor: '#',
height: 60,
width: 120,
spotRadius: 6,
});
$('#sparkline1').sparkline([5, 6, 2, 8, 9, 4, 7, 10, 11, 12, 7], {
type: 'bar',
height: '80',
barWidth: '10',
barWidth: 2,
barSpacing: 10,
chartRangeMin: 0,
barColor: '#e6ecf5'
});
$("#downloads").sparkline([290,320,310,365,420,320,350,370,320], {
type: 'bar',
barWidth: 10,
height: 60,
width: 120,
barSpacing: 5,
barColor: '#058DC7',
negBarColor: '#ffffaa'
});
$(".watch1").sparkline([2,4,4,6,8,5,6,4,8,6,6,2 ], {
type: 'line',
width: '100%',
height: '80',
lineColor: '#13dafe',
fillColor: 'rgba(19, 218, 254, 0.3)',
maxSpotColor: '#99d683',
highlightLineColor: 'rgba(0, 0, 0, 0.2)',
highlightSpotColor: 'rgba(0,0,0,.2)'
});
$('.watch2').sparkline([0,13,10,14,15,10,18,15,19], {
type: 'line',
width: '100%',
height: '80',
lineColor: '#6164c1',
fillColor: 'rgba(97, 100, 193, 0.3)',
highlightLineColor: 'rgba(0,0,0,.1)',
highlightSpotColor: 'rgba(0,0,0,.2)'
});
$(".watch3").sparkline([0,2,8,6,8,5,6,4,8,6,6,2 ], {
type: 'line',
width: '100%',
height: '80',
lineColor: '#fa8282',
fillColor: 'rgba(255,211,152,.8)',
minSpotColor:'#13dafe',
maxSpotColor: '#13dafe',
highlightLineColor: 'rgba(0, 0, 0, 0.2)',
highlightSpotColor: '#13dafe'
});
$(".watch4").sparkline([3,7,5,6,8,7,6,7,8,6,6,9 ], {
type: 'line',
width: '100%',
height: '80',
lineColor: '#13dafe',
fillColor: 'rgba(153,214,131,.7)',
minSpotColor:'#13dafe',
maxSpotColor: '#13dafe',
highlightLineColor: 'rgba(0, 0, 0, 0.2)',
highlightSpotColor: '#13dafe'
});
$(".watch5").sparkline([2,5,6,6,9,5,7,7,8,5,6,8 ], {
type: 'line',
width: '100%',
height: '80',
lineColor: '#fc6180',
fillColor: 'rgba(252, 97, 128, 0.3)',
maxSpotColor: '#99d683',
highlightLineColor: 'rgba(0, 0, 0, 0.2)',
highlightSpotColor: 'rgba(0,0,0,.2)'
});
$(".profile1").sparkline([0,2,8,6,8,5,6,4,8,6,6,2 ], {
type: 'bar',
width: '100%',
height: '50',
barColor: '#fa8282',
fillColor: 'rgba(255,211,152,.8)',
minSpotColor:'#13dafe',
maxSpotColor: '#13dafe',
highlightLineColor: 'rgba(0, 0, 0, 0.2)',
highlightSpotColor: '#13dafe'
});
$(".profile2").sparkline([3,7,5,6,8,7,6,7,8,6,6,9 ], {
type: 'bar',
width: '100%',
height: '50',
barColor: '#13dafe',
fillColor: 'rgba(153,214,131,.7)',
minSpotColor:'#13dafe',
maxSpotColor: '#13dafe',
highlightLineColor: 'rgba(0, 0, 0, 0.2)',
highlightSpotColor: '#13dafe'
});
$(".profile3").sparkline([2,5,6,6,9,5,7,7,8,5,6,8 ], {
type: 'bar',
width: '100%',
height: '50',
barColor: '#72a1ec'
});
$("#total-applications").sparkline([212,257,284,315,365,383,358,371,329,295,321,392,316,423,477,495,419], {
type: 'line',
lineWidth: 3,
fillColor: false,
lineColor: '#058DC7',
spotColor: '#e13f3d',
minSpotColor: '#50B432',
maxSpotColor: '#f7b53c',
highlightSpotColor: '#',
height: 40,
width: 180,
spotRadius: 5,
});
});
// Flot Donut Chart
$(function () {
var data, chartOptions;
data = [
{ label: "", data: Math.floor (Math.random() * 100 + 140) },
{ label: "", data: Math.floor (Math.random() * 100 + 30) },
{ label: "", data: Math.floor (Math.random() * 100 + 60) },
{ label: "", data: Math.floor (Math.random() * 100 + 90) },
{ label: "", data: Math.floor (Math.random() * 100 + 120) },
];
chartOptions = {
series: {
pie: {
show: true,
innerRadius: .8,
stroke: {
width: 1,
}
}
},
shadowSize: 0,
legend: {
position: 'sw'
},
tooltip: true,
tooltipOpts: {
content: '%s: %y'
},
grid:{
hoverable: false,
clickable: false,
borderWidth: 0,
},
shadowSize: 0,
colors: ['#F782AA', '#0084B4', '#3FC5AC', '#FFD06B', '#CCCCCC'],
};
var holder = $('#advertising');
if (holder.length) {
$.plot(holder, data, chartOptions );
}
});

@ -0,0 +1,281 @@
"use strict";
$(document).ready(function(){
$('.navi-menu-button').on('click', function(e){
navMenuOpen();
});
$('.nav-menu').on('click', function(e){
if ($(e.target).hasClass('nav-menu')){
navMenuClose();
}
});
$('nav.menu ul.main-menu>li>a').on('click', function(e){
var that = $(this);
if (that.parent().find('ul:first').length)
{
e.preventDefault();
if (!that.parent().hasClass('active'))
{
$('nav.menu ul.main-menu ul').slideUp('fast',function(){
$('nav.menu ul.main-menu > li').removeClass('active');
});
$('nav.menu ul li a span').removeClass('fa-angle-up').addClass('fa-angle-down');
that.parent().find('ul:first').slideDown('fast',function(){
that.parent().addClass('active');
});
that.find('span').removeClass('fa-angle-down').addClass('fa-angle-up');
}
else
{
that.parent().find('ul:first').slideUp('fast',function(){
$(this).parent().removeClass('active');
});
that.find('span').removeClass('fa-angle-up').addClass('fa-angle-down');
}
}
else
{
$('nav.menu ul.main-menu ul').slideUp('fast');
$('nav.menu ul.main-menu > li').removeClass('active');
that.parent().addClass('active');
}
});
$('.tab-item .fix-width .menu-item').css({'width': 100/$('.tab-item .fix-width .menu-item').length+'%'});
if ($('.wizard').length)
{
wizardFixHeight();
$(window).resize();
}
if ($('.wizard').length) {
$(".wizard").Turbo({
items:1,
circular:false
});
}
if ($('.animated-text').length)
animateText();
});
$(".wrapper-inline").on("scroll", function(e) {
if (this.scrollTop > 150) {
$('header.no-background').addClass("set-bg");
} else {
$('header.no-background').removeClass("set-bg");
}
});
var navMenuOpen = function(){
$('.navi-menu-button').addClass('focused');
$('div.nav-menu').fadeIn(50,function(e){
$('nav.menu').addClass('opened');
});
}
var navMenuClose = function(){
$('.navi-menu-button').removeClass('focused');
$('nav.menu').removeClass('opened');
$('div.nav-menu').fadeOut(200);
}
var wizardFixHeight = function(){
$(window).on('resize', function(e){
$('.wizard .wizard-item').height($(window).height()-50);
});
}
var animateText = function(){
$('.vertical-center').css({'margin-top':$(window).height()/2 - $('.vertical-center').height()/2});
$('.animated-text').removeClass('zero-opacity');
$('[data-transation]').each(function(e,i){
var that = $(this);
that.addClass('hide');
var transation = that.attr('data-transation');
if (transation == '')
transation = 'fadeInDown';
var startTime = parseInt(that.attr('data-start-time'));
if (isNaN(startTime))
startTime = 0;
setTimeout(function(){
that.addClass('animated '+transation);
},startTime);
})
}
/*sweet checkbox scripts*/
$('.sweet-check :checkbox:checked').each(function(e,i){
$(this).parent().addClass('checked');
});
$(document).on('click', '.sweet-check', function(){
if ($(this).hasClass('checked'))
{
$(this).removeClass('checked');
$(this).find('input').prop('checked', false);
}
else
{
$(this).addClass('checked');
$(this).find('input').prop('checked', true);
}
//console.log($(this).find('input').prop('checked'));
});
$(document).on('click','[data-loader]', function(){
$('.sweet-loader').show().addClass('show');
});
/*expandable list scrips****/
$(document).on('click', '.expandable-item .expandable-header', function(){
if ($(this).parent().hasClass('accordion'))
{
if ($(this).parent().hasClass('active'))
{
$(this).parent().removeClass('active');
$(this).parent().find('.expandable-content').attr('style','');
}
else
{
var accordionGroup = $(this).parent().attr('data-group');
$('[data-group="'+accordionGroup+'"]').removeClass('active');
$('[data-group="'+accordionGroup+'"]').find('.expandable-content').attr('style','');
$(this).parent().find('.expandable-content').css({'max-height':$(this).parent().find('.expandable-content')[0].scrollHeight});
$(this).parent().addClass('active');
}
}
else
{
if ($(this).parent().hasClass('active'))
$(this).parent().find('.expandable-content').attr('style','');
else
$(this).parent().find('.expandable-content').css({'max-height':$(this).parent().find('.expandable-content')[0].scrollHeight});
$(this).parent().toggleClass('active');
}
});
$(document).on('click', '.tab-item .menu-item', function(e){
e.preventDefault();
var tabContentId = $(this).attr('data-content');
$(this).parents('.tab-item').find('.menu-item').removeClass('active');
$(this).addClass('active');
$(this).parents('.tab-item').find('.content-item').removeClass('active');
$('#'+tabContentId).addClass('active');
});
/*post item scripts **************/
$(document).on('click', '.post-item .post-share > i', function(e){
e.preventDefault();
$(this).parent().find('.social-links').fadeToggle('fast');
});
/*popup actions ******************/
$(document).on('click', '[data-dismiss="true"]', function(){
$(this).parents('.popup-overlay').fadeOut('fast');
});
$(document).on('click', '[data-popup]', function(){
var modalId = $(this).attr('data-popup');
$('#'+modalId).fadeIn('fast');
});
$(document).on('click', '.popup-overlay', function(e){
if ($(e.target).hasClass('popup-overlay'))
{
$(this).fadeOut('fast');
}
});
/*search popup actions ************/
var openSearchPopup = function(){
$('.search-form').fadeIn('fast');
$('.search-form input').focus();
}
var closeSearchPopup = function(){
$('.search-form').fadeOut('fast');
}
$(document).on('click', '[data-search="open"]', function(){
openSearchPopup();
});
$(document).on('click', '[data-search="close"]', function(){
closeSearchPopup();
});
// ------------------------------------------------------- //
// Swiper Slider
// ------------------------------------------------------ //
if($('.swiper-container').length || $('.swiper-recievers').length){
var swiper = new Swiper('.swiper-container', {
slidesPerView: 2,
breakpoints: {
400: {
slidesPerView: 1
}
},
pagination: {
el: '.swiper-pagination',
},
});
var swiper = new Swiper('.swiper-recievers', {
slidesPerView: 4,
breakpoints: {
400: {
slidesPerView:3
}
}
});
}
// ------------------------------------------------------- //
// Map
// ------------------------------------------------------ //
function initMap() {
var coords = {lat: 40.7127837, lng: -74.00594130000002};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 17,
center: coords
});
var marker = new google.maps.Marker({
position: coords,
map: map
});
}

File diff suppressed because one or more lines are too long

1
js/qrcode.min.js vendored

File diff suppressed because one or more lines are too long

13
js/swiper.min.js vendored

File diff suppressed because one or more lines are too long

@ -0,0 +1,191 @@
.c3 svg {
font-size: 12px;
-webkit-tap-highlight-color: transparent
}
.c3 line,
.c3 path {
fill: none;
stroke: #ccc
}
.c3-legend-item-tile {
stroke-width: 5
}
.c3 text {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
fill: #666
}
.c3-bars path,
.c3-event-rect,
.c3-legend-item-tile,
.c3-xgrid-focus,
.c3-ygrid {
shape-rendering: crispEdges
}
.c3-chart-arc path {
stroke: #FFF
}
.c3-chart-arc text {
fill: #fff;
font-size: 13px
}
.c3-grid line {
stroke: #ccc
}
.c3-grid text {
fill: #535D6F
}
.c3-xgrid,
.c3-ygrid {
stroke-dasharray: 3 3
}
.c3-text.c3-empty {
fill: grey;
font-size: 2em
}
.c3-line {
stroke-width: 2px
}
.c3-circle._expanded_ {
stroke-width: 1px;
stroke: #fff
}
.c3-selected-circle {
fill: #fff;
stroke-width: 4px
}
.c3-bar {
stroke-width: 0
}
.c3-bar._expanded_ {
fill-opacity: .75
}
.c3-target.c3-focused {
opacity: 1
}
.c3-target.c3-focused path.c3-line,
.c3-target.c3-focused path.c3-step {
stroke-width: 2px
}
.c3-target.c3-defocused {
opacity: .3
}
.c3-region {
fill: #4682b4;
fill-opacity: .1
}
.c3-brush .extent {
fill-opacity: .1
}
.c3-legend-item {
font-size: 12px
}
.c3-legend-item-hidden {
opacity: .15
}
.c3-legend-background {
opacity: .75;
fill: #fff;
stroke: #d3d3d3;
stroke-width: 1
}
.c3-title {
font-size: 14px
}
.c3-tooltip-container {
z-index: 10
}
.c3-tooltip {
padding: 10px;
border-collapse: collapse;
border-spacing: 0;
background-color: #222;
fill: #BBB;
color: #BBB;
font-size: 12px;
display: block;
min-width: 90px
}
.c3-tooltip td {
font-size: 13px;
padding: 3px;
background-color: #1E2229
}
.c3-tooltip td>span {
display: inline-block;
width: 10px;
height: 10px;
margin-right: 6px
}
.c3-tooltip td.value {
text-align: right
}
.c3-area {
stroke-width: 0;
opacity: .2
}
.c3-chart-arcs-title {
dominant-baseline: middle;
font-size: 1.3em
}
.c3-chart-arcs .c3-chart-arcs-background {
fill: #e0e0e0;
stroke: none
}
.c3-chart-arcs .c3-chart-arcs-gauge-unit {
fill: #ccc;
font-size: 16px
}
.c3-chart-arc .c3-gauge-value,
.c3-chart-arcs .c3-chart-arcs-gauge-max,
.c3-chart-arcs .c3-chart-arcs-gauge-min {
fill: #ccc
}
.panel-blue .c3-grid line {
stroke: #11436d
}
.panel-blue .c3 line,
.panel-blue .c3 path {
stroke: #4a8fca
}
.panel-blue .c3 text {
fill: #abd8ff
}

@ -0,0 +1,271 @@
var chart1=c3.generate( {
bindto:"#lineGraph", data: {
columns:[["data1", 14, 28, 31, 49, 57, 59, 52, 48, 55, 58, 62, 60, 62, 58, 55, 61, 70, 80, 77, 78, 82, 98, 99, 121, 136, 115, 112, 120, 103, 117, 121, 126], ["data2", 3, 16, 19, 24, 27, 32, 38, 36, 32, 36, 40, 48, 41, 44, 46, 53, 58, 62, 65, 61, 64, 62, 59, 63, 87, 92, 72, 81, 75, 80, 97, 97]], names: {
data1: "onGoing", data2: "Completed"
}
, colors: {
data1: "#f0b518", data2: "#3a86c8"
}
}
}
),
chart2=c3.generate( {
bindto:"#splineGraph", data: {
columns:[["data1", 24, 28, 31, 49, 57, 59, 52, 48, 55, 58, 62, 60, 62, 58, 55, 61, 70, 80, 77, 78, 82, 98, 99, 105, 102, 95, 92, 100, 103, 117, 121, 126], ["data2", 15, 16, 19, 24, 27, 32, 38, 36, 32, 36, 40, 48, 41, 44, 46, 53, 58, 62, 65, 61, 64, 62, 59, 63, 67, 69, 72, 71, 75, 80, 65, 71]], types: {
data1: "spline", data2: "area-spline"
}
, names: {
data1: "Likes", data2: "Clicks"
}
, colors: {
data1: "#3a86c8", data2: "#c282e0"
}
}
}
),
chart3=c3.generate( {
bindto:"#areaSplineGraph", data: {
columns:[["data1", 24, 49, 52, 48, 62, 60, 62, 70, 80, 82, 95, 92, 100, 103, 117, 121, 136], ["data2", 15, 27, 39, 32, 40, 48, 46, 57, 64, 62, 59, 71, 75, 80, 65, 71, 102]], types: {
data1: "area-spline", data2: "area-spline"
}
, names: {
data1: "Male", data2: "Female"
}
, colors: {
data1: "#F782AA", data2: "#3a86c8"
}
}
}
),
chart4=c3.generate( {
bindto:"#stepGraph", data: {
columns:[["data1", 52, 59, 78, 102, 95, 92, 100, 48, 55, 58, 62, 60, 24, 28, 31, 49, 57, 103, 117, 121, 126], ["data2", 27, 32, 38, 36, 32, 36, 40, 15, 16, 82, 81, 85, 90, 95, 71, 19, 24, 44, 59, 73, 77, 89]], types: {
data1: "step", data2: "area-step"
}
, names: {
data1: "Twitter", data2: "LinkedIn"
}
, colors: {
data1: "#3a86c8", data2: "#f0b518"
}
}
}
),
chart5=c3.generate( {
bindto:"#barAreaGraph", data: {
columns:[["data1", 24, 28, 31, 49, 57, 59, 52, 48, 55, 58, 62, 60, 62, 58, 55, 61, 70, 80, 77, 78, 82, 98, 99, 105, 102, 95, 92, 100, 103, 117, 121, 126], ["data2", 15, 16, 19, 24, 27, 32, 38, 36, 32, 36, 40, 48, 41, 44, 46, 53, 58, 62, 65, 61, 64, 62, 59, 63, 67, 69, 72, 71, 75, 80, 65, 71]], types: {
data1: "bar", data2: "area"
}
, names: {
data1: "Twitter", data2: "LinkedIn"
}
, colors: {
data1: "#E9BB27", data2: "#3a86c8"
}
}
}
),
chart6=c3.generate( {
bindto:"#barGraph", data: {
columns:[["data1", 15, 58, 62, 87, 32, 58, 55, 21, 20, 30, 98, 10, 22, 98, 99, 105, 82, 57, 121, 78], ["data2", 21, 26, 30, 38, 11, 24, 36, 53, 58, 62, 65, 61, 64, 32, 45, 71, 38, 23, 65, 11]], type:"bar", names: {
data1: "Referrals", data2: "Signups"
}
, colors: {
data1: "#fee074", data2: "#66c0dc"
}
}
}
),
chart7=c3.generate( {
bindto:"#stackedBarGraph", data: {
columns:[["data1", 30, 90, 200, 400, 590, 250, 330, 120, 480, 560, 220, 300, 240, 470, 680, 550, 250, 330, 120, 90]], type:"bar", names: {
data1: "Crypto Balance"
}
, colors: {
data1: "#1d73bd"
}
, groups:[["data1"]]
}
, grid: {
x: {
show: !0
}
, y: {
show: !0
}
}
}
),
chart8=c3.generate( {
bindto:"#scatterPlot", data: {
xs: {
Male: "male_x", Female: "female_x"
}
, columns:[["male_x", 3.5, 3, 3.2, 3.1, 3.6, 3.9, 3.4, 3.4, 2.9, 3.1, 3.7, 3.4, 3, 3, 4, 4.4, 3.9, 3.5, 3.8, 3.8, 3.4, 3.7, 3.6, 3.3, 3.4, 3, 3.4, 3.5, 3.4, 3.2, 3.1, 3.4, 4.1, 4.2, 3.1, 3.2, 3.5, 3.6, 3, 3.4, 3.5, 2.3, 3.2, 3.5, 3.8, 3, 3.8, 3.2, 3.7, 3.3], ["female_x", 3.2, 3.2, 3.1, 2.3, 2.8, 2.8, 3.3, 2.4, 2.9, 2.7, 2, 3, 2.2, 2.9, 2.9, 3.1, 3, 2.7, 2.2, 2.5, 3.2, 2.8, 2.5, 2.8, 2.9, 3, 2.8, 3, 2.9, 2.6, 2.4, 2.4, 2.7, 2.7, 3, 3.4, 3.1, 2.3, 3, 2.5, 2.6, 3, 2.6, 2.3, 2.7, 3, 2.9, 2.9, 2.5, 2.8], ["Male", .2, .2, .2, .2, .2, .4, .3, .2, .2, .1, .2, .2, .1, .1, .2, .4, .4, .3, .3, .3, .2, .4, .2, .5, .2, .2, .4, .2, .2, .2, .2, .4, .1, .2, .2, .2, .2, .1, .2, .2, .3, .3, .2, .6, .4, .3, .2, .2, .2, .2], ["Female", 1.4, 1.5, 1.5, 1.3, 1.5, 1.3, 1.6, 1, 1.3, 1.4, 1, 1.5, 1, 1.4, 1.3, 1.4, 1.5, 1, 1.5, 1.1, 1.8, 1.3, 1.5, 1.2, 1.3, 1.4, 1.4, 1.7, 1.5, 1, 1.1, 1, 1.2, 1.6, 1.5, 1.6, 1.5, 1.3, 1.3, 1.3, 1.2, 1.4, 1.2, 1, 1.3, 1.2, 1.3, 1.3, 1.1, 1.3]], type:"scatter", colors: {
Male: "#3a86c8", Female: "#dd5826"
}
}
, axis: {
x: {
label:"Male Visitors", tick: {
fit: !1
}
}
, y: {
label: "Female Visitors"
}
}
}
),
chart9=c3.generate( {
bindto:"#pieChart", data: {
columns:[["Likes", 36], ["Shares", 62]], type:"pie", colors: {
Likes: "#91c46b", Shares: "#3a86c8"
}
, onclick:function(a, b) {
console.log("onclick", a, b)
}
, onmouseover:function(a, b) {
console.log("onmouseover", a, b)
}
, onmouseout:function(a, b) {
console.log("onmouseout", a, b)
}
}
}
),
chart10=c3.generate( {
bindto:"#donutChart", data: {
columns:[["Likes", 32], ["Shares", 87], ["Clicks", 51]], type:"donut", colors: {
Likes: "#c282e0", Shares: "#c38fbb", Clicks: "#F782AA"
}
, onclick:function(a, b) {
console.log("onclick", a, b)
}
, onmouseover:function(a, b) {
console.log("onmouseover", a, b)
}
, onmouseout:function(a, b) {
console.log("onmouseout", a, b)
}
}
}
),
chart11=c3.generate( {
bindto:".accountValue", padding: {
top: 10, left: 40
}
, data: {
columns:[["data1", 18, 22, 90, 33, 19, 21, 28, 21, 19, 43, 23, 34, 55, 43, 33, 77, 33, 87, 46, 39, 51, 32, 66, 99, 32, 54, 33, 24, 54, 22, 37, 76, 67, 89, 34, 12, 77, 99, 59, 66, 28, 77, 39, 60, 66, 99, 32, 54, 33, 24, 54, 22, 37, 76, 67, 89, 34, 12, 77, 99, 59, 66, 28, 77, 39, 60]], types: {
data1: "area"
}
, names: {
data1: "Account Val"
}
, colors: {
data1: "#c38fbb"
}
}
, axis: {
y: {
tick: {
count: 3
}
}
}
}
),
chart12=c3.generate( {
bindto:"#domestic", data: {
columns:[["Domestic", 70], ["International", 120]], type:"pie", colors: {
Domestic: "#E24B46", International: "#1d73bd"
}
}
, legend: {
show: !1
}
, tooltip: {
show: !1
}
, pie: {
label: {
show: !1
}
}
}
),
chart13=c3.generate( {
bindto:"#domain", data: {
columns:[["Com", 100], ["Org", 20], ["Net", 15], ["Biz", 10], ["Others", 5]], type:"pie", colors: {
Com: "#fa9255", Org: "#fee074", Net: "#47BCC7", Biz: "#F782AA", Others: "#aed048"
}
}
, legend: {
show: !1
}
, tooltip: {
show: !1
}
, pie: {
label: {
show: !1
}
}
}
),
chart14=c3.generate( {
bindto:"#imgFonts", data: {
columns:[["Images", 170], ["Fonts", 50], ["Text", 30]], type:"pie", colors: {
Images: "#5c6bc2", Fonts: "#C790E1", Text: "#F782AA"
}
}
, legend: {
show: !1
}
, tooltip: {
show: !1
}
, pie: {
label: {
show: !1
}
}
}
),
chart5=c3.generate( {
bindto:"#globalLocal", data: {
columns:[["data2", 15, 19, 27, 32, 38, 36, 32, 36, 40, 48, 46, 53, 58, 62, 65, 99]], types: {
data2: "area-spline"
}
, names: {
data2: "Active Users"
}
, colors: {
data2: "#52bf8a"
}
}
, axis: {
x: {
show: !1
}
, y: {
show: !1
}
}
}
);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save