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
<div id="search"> | |
<form id="orderform" action="<?php echo $html->url('/users/search'); ?>" method="post" enctype="multipart/form-data"> | |
<label for="searchuser">Search Users:</label><input type="text" name="searchuser" /> | |
Search By: | |
<input type="radio" name="searchtype" value="User.id" checked> User ID | |
<input type="radio" name="searchtype" value="User.email" checked> User Email | |
<input type="radio" name="searchtype" value="Entity.name"> Entity Name | |
<?php | |
echo $form->end('Search'); | |
?> |
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
<styleRun style="10178" offset="0" length="1"/> | |
<text>Website</text> |
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 | |
/** | |
*Publish video to ooyala | |
*/ | |
function publish(){// this kicks off the massive publish functions | |
$labels = $_POST['label']; | |
$file = $_POST['video_file']; | |
$dir = $file; | |
$name = explode("/", $dir ); | |
$name = array_reverse($name );//this get just the name of the file and not |
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 | |
//MediaSilo Information | |
$server = "upload.mediasilo.com"; | |
$ftp_user_name = "YOUR MEDIASILO LOGIN NAME AND HOSTNAME(e.g NAMEHOSTNAME"; | |
$ftp_user_pass = "YOUR MEDIASILO LOGIN PASSWORD"; | |
$dest = "THE WORKSPACE YOU WANT TO UPLOAD TO"; | |
//Video Folder Information | |
$source_folder = "FULL PATH TO FOLDER. NO TRAILING SLASH (e.g. /var/www/videofolder)"; | |
//Grabs everything in the source folder. You may want to set a file type like, ($source_folder."/*.flv") |
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 | |
// WARNING | |
// This code should NOT be used as is. It is vulnerable to path traversal. https://www.owasp.org/index.php/Path_Traversal | |
// You should sanitize $_GET['directtozip'] | |
// For tips to get started see http://stackoverflow.com/questions/4205141/preventing-directory-traversal-in-php-but-allowing-paths | |
//Get the directory to zip | |
$filename_no_ext= $_GET['directtozip']; | |
// we deliver a zip file |
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 | |
$baseurl = 'http://www.example.com'; //set the base url of the site | |
$pageYouWant = $baseurl."/the-rest-of-the-url"; //add the rest of the url you want to check against | |
$currentPage = $baseurl.$_SERVER['REQUEST_URI'];// this gets the current page url | |
if($pageYouWant==$currentPage) { | |
//do something | |
} | |
?> |
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 | |
function comment_author_link_mine( $comment_ID = 0 ) { | |
echo get_comment_author_link_mine( $comment_ID ); | |
} | |
function get_comment_author_link_mine( $comment_ID = 0 ) { | |
/** @todo Only call these functions when they are needed. Include in if... else blocks */ | |
$url = get_comment_author_url( $comment_ID ); | |
$author = get_comment_author( $comment_ID ); |
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
sudo apt-get install nginx |
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
sudo /etc/init.d/php5-fpm restart |
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
## Parse all .php file in the /var/www directory | |
location ~ \.php$ | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(.*)$; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name; | |
include fastcgi_params; | |
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param REQUEST_METHOD $request_method; |