Skip to content

Commit

Permalink
- initial
Browse files Browse the repository at this point in the history
  • Loading branch information
snick512 committed Aug 25, 2024
1 parent 0f53750 commit c4d1678
Show file tree
Hide file tree
Showing 107 changed files with 7,974 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

# .v4p backup files
*~.xml

/stock/
/i/media/
/i/content/drafts/
letter.html
bin/
elements.html
ip_b.txt
/club/
/member/
/webeditor/
/Webplayer/
playlist.php
/media
/book/
radio/guests.php
db.php
embed.php
#functions.php
/cinema
css/fonts/fontello/demo.html
Binary file added bg/BGV2.mp4
Binary file not shown.
Binary file added bg/promo_jan26.mp4
Binary file not shown.
Binary file added bg/promo_jan26_captions.mp4
Binary file not shown.
82 changes: 82 additions & 0 deletions cfgeo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php

function ip_info($ip = NULL, $purpose = "location", $deep_detect = TRUE) {
$output = NULL;
if (filter_var($ip, FILTER_VALIDATE_IP) === FALSE) {
$ip = $_SERVER["REMOTE_ADDR"];
if ($deep_detect) {
if (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP))
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP))
$ip = $_SERVER['HTTP_CLIENT_IP'];
}
}
$purpose = str_replace(array("name", "\n", "\t", " ", "-", "_"), NULL, strtolower(trim($purpose)));
$support = array("country", "countrycode", "state", "region", "city", "location", "address");
$continents = array(
"AF" => "Africa",
"AN" => "Antarctica",
"AS" => "Asia",
"EU" => "Europe",
"OC" => "Australia (Oceania)",
"NA" => "North America",
"SA" => "South America"
);
if (filter_var($ip, FILTER_VALIDATE_IP) && in_array($purpose, $support)) {
$ipdat = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=" . $ip));
if (@strlen(trim($ipdat->geoplugin_countryCode)) == 2) {
switch ($purpose) {
case "location":
$output = array(
"city" => @$ipdat->geoplugin_city,
"state" => @$ipdat->geoplugin_regionName,
"country" => @$ipdat->geoplugin_countryName,
"country_code" => @$ipdat->geoplugin_countryCode,
"continent" => @$continents[strtoupper($ipdat->geoplugin_continentCode)],
"continent_code" => @$ipdat->geoplugin_continentCode
);
break;
case "address":
$address = array($ipdat->geoplugin_countryName);
if (@strlen($ipdat->geoplugin_regionName) >= 1)
$address[] = $ipdat->geoplugin_regionName;
if (@strlen($ipdat->geoplugin_city) >= 1)
$address[] = $ipdat->geoplugin_city;
$output = implode(", ", array_reverse($address));
break;
case "city":
$output = @$ipdat->geoplugin_city;
break;
case "state":
$output = @$ipdat->geoplugin_regionName;
break;
case "region":
$output = @$ipdat->geoplugin_regionName;
break;
case "country":
$output = @$ipdat->geoplugin_countryName;
break;
case "countrycode":
$output = @$ipdat->geoplugin_countryCode;
break;
}
}
}
return $output;
}

/*
echo ip_info("Visitor", "Country"); // India
echo ip_info("Visitor", "Country Code"); // IN
echo ip_info("Visitor", "State"); // Andhra Pradesh
echo ip_info("Visitor", "City"); // Proddatur
echo ip_info("Visitor", "Address"); // Proddatur, Andhra Pradesh, India
*/

$v_a = ip_info("Visitor", "Address"); // Proddatur, Andhra Pradesh, India

//echo $v_a;

//print_r(ip_info("Visitor", "Location"));

?>
130 changes: 130 additions & 0 deletions cfip.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<?php
require_once("cfgeo.php");
require_once("functions.php");

$today_date = date("F j");
$today_year = date("Y");
$today_time = date("g:i a");
//$log = preg_replace('/\s+/', '', $today);
$logfile = "/var/www/tyclifford/dec-ip_b-test.csv";

$agent = $_SERVER["HTTP_USER_AGENT"];
$uri = $_SERVER['REQUEST_URI'];



if( preg_match('/MSIE (\d+\.\d+);/', $agent) ) {
$browser = "Internet Explorer";
} else if (preg_match('/Chrome[\/\s](\d+\.\d+)/', $agent) ) {
$browser = "Chrome";
} else if (preg_match('/Edge\/\d+/', $agent) ) {
$browser = "Edge";
} else if ( preg_match('/Firefox[\/\s](\d+\.\d+)/', $agent) ) {
$browser = "Firefox";
} else if ( preg_match('/OPR[\/\s](\d+\.\d+)/', $agent) ) {
$browser = "Opera";
} else if (preg_match('/Safari[\/\s](\d+\.\d+)/', $agent) ) {
$browser = "Safari";
}


function get_ip(){
if( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ){
$ip = $_SERVER['HTTP_CLIENT_IP'];
}
elseif( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ){
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
else{
$ip = $_SERVER['REMOTE_ADDR'];
}

return $ip;
}

function get_real_ip(){
// Get IP Address
$ip = get_ip();

if( function_exists( 'is_cloudflare' ) ){
if( is_cloudflare() ) {
$ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
}
}

return strip_tags( $ip );
}

function ip_in_range( $ip, $range ){
if ( mb_strpos( $range, '/' ) == false )
$range .= '/32';

// $range is in IP/CIDR format eg 127.0.0.1/24
list( $range, $netmask ) = explode( '/', $range, 2 );
$range_decimal = ip2long( $range );
$ip_decimal = ip2long( $ip );
$wildcard_decimal = ( pow( 2, ( 32 - $netmask ) ) - 1);
$netmask_decimal = ~ $wildcard_decimal;
return ( ( $ip_decimal & $netmask_decimal ) == ( $range_decimal & $netmask_decimal ) );
}

function __cloudflare_check_ip( $ip ){
// @link https://www.cloudflare.com/ips/
$cf_ips = array(
'199.27.128.0/21',
'173.245.48.0/20',
'103.21.244.0/22',
'103.22.200.0/22',
'103.31.4.0/22',
'141.101.64.0/18',
'108.162.192.0/18',
'190.93.240.0/20',
'188.114.96.0/20',
'197.234.240.0/22',
'198.41.128.0/17',
'162.158.0.0/15',
'104.16.0.0/12',
'172.64.0.0/13',
'131.0.72.0/22'
);

$is_cf_ip = false;
foreach( $cf_ips as $cf_ip ) {
if( ip_in_range( $ip, $cf_ip ) ){
$is_cf_ip = true;
break;
}
}

return $is_cf_ip;
}

function __cloudflare_requests_check() {
$flag = true;

if( ! ( isset( $_SERVER['HTTP_CF_CONNECTING_IP'] ) || isset( $_SERVER['HTTP_CF_IPCOUNTRY'] ) || isset( $_SERVER['HTTP_CF_RAY'] ) || isset( $_SERVER['HTTP_CF_VISITOR'] ) ) )
$flag = false;

return $flag;
}

function is_cloudflare() {
$ip_cf_check = __cloudflare_check_ip( get_ip() );
$cf_request_check = __cloudflare_requests_check();

return (bool) ( $ip_cf_check && $cf_request_check );
}

$v_ip = get_real_ip();


//echo "<p>MIP: <code>{$my_ip}</code></p><br />";
//$sfip = $_SERVER['REMOTE_ADDR'];
//echo $sfip;

$myfile = fopen("$logfile", "a") or die("File lock!");
$txt = "$v_ip,$today_date,$today_year,$today_time,$browser,$uri,$v_a\n";
fwrite($myfile, $txt);
fclose($myfile);

//echo "$today";
5 changes: 5 additions & 0 deletions css/_notes/dwsync.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="main.css" server="ftp.populerdunya.com/lazyguy/" local="131387013542778043" remote="131386726800000000" Dst="0" />
<file name="main.css" server="ftp.populerdunya.com/lazyguy/demo/" local="131359779052126602" remote="131362965000000000" Dst="0" />
</dwsync>
93 changes: 93 additions & 0 deletions css/fonts/fontello/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Font license info


## Font Awesome

Copyright (C) 2016 by Dave Gandy

Author: Dave Gandy
License: SIL ()
Homepage: http://fortawesome.github.com/Font-Awesome/


## Iconic

Copyright (C) 2012 by P.J. Onori

Author: P.J. Onori
License: SIL (http://scripts.sil.org/OFL)
Homepage: http://somerandomdude.com/work/iconic/


## Linecons

Copyright (C) 2013 by Designmodo

Author: Designmodo for Smashing Magazine
License: CC BY ()
Homepage: http://designmodo.com/linecons-free/


## Typicons

(c) Stephen Hutchings 2012

Author: Stephen Hutchings
License: SIL (http://scripts.sil.org/OFL)
Homepage: http://typicons.com/


## Maki

Copyright (C) Mapbox, LCC

Author: Mapbox
License: BSD (https://github.com/mapbox/maki/blob/gh-pages/LICENSE.txt)
Homepage: http://mapbox.com/maki/


## Entypo

Copyright (C) 2012 by Daniel Bruce

Author: Daniel Bruce
License: SIL (http://scripts.sil.org/OFL)
Homepage: http://www.entypo.com


## Elusive

Copyright (C) 2013 by Aristeides Stathopoulos

Author: Aristeides Stathopoulos
License: SIL (http://scripts.sil.org/OFL)
Homepage: http://aristeides.com/


## Zocial

Copyright (C) 2012 by Sam Collins

Author: Sam Collins
License: MIT (http://opensource.org/licenses/mit-license.php)
Homepage: http://zocial.smcllns.com/


## Modern Pictograms

Copyright (c) 2012 by John Caserta. All rights reserved.

Author: John Caserta
License: SIL (http://scripts.sil.org/OFL)
Homepage: http://thedesignoffice.org/project/modern-pictograms/


## Brandico

(C) 2012 by Vitaly Puzrin

Author: Crowdsourced, for Fontello project
License: SIL (http://scripts.sil.org/OFL)
Homepage:


Loading

0 comments on commit c4d1678

Please sign in to comment.