This file contains 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
find . -name '*.php' | xargs wc -l |
This file contains 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 Zend_View_Helper_FormatDate extends Zend_View_Helper_Abstract { | |
public function formatDate($date) { | |
if ($date) | |
return date('d/m/Y', strtotime($date)); | |
} | |
} |
This file contains 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 Zend_View_Helper_FormatTime extends Zend_View_Helper_Abstract { | |
function formatTime($time) { | |
if ($time) | |
return date('H:i', strtotime($time)); | |
} | |
} |
This file contains 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 Zend_View_Helper_FormatToHourMinutes extends Zend_View_Helper_Abstract { | |
function formatToHourMinutes($decTime) { | |
if(!is_numeric($decTime))return $decTime; | |
$hour = floor($decTime); | |
$min = round(60 * ($decTime - $hour)); |
This file contains 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 | |
// connect | |
$ftp = ftp_connect("example.com");//or IP address as variable | |
if (!$ftp) die('could not connect.'); | |
// login | |
$r = ftp_login($ftp, "anonymous", ""); | |
if (!$r) die('could not login.'); |
This file contains 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
HISTORY ************************************ | |
To view your history in a editor (to save for later), just type: | |
history -w ~/history.txt | |
vim ~/history.txt | |
export HISTTIMEFORMAT="%F %T " | |
export HISTTIMEFORMAT='%F %T ' |
This file contains 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 | |
$view = Zend_Layout::getMvcInstance()->getView(); | |
$url = $view->baseUrl(); | |
echo $url;//use the baseUrl() | |
echo $view->formatToHourMinutes($value);//use a view helper |
This file contains 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
$(document).ready(function(){ | |
$date_from = $('#date_from').val();$date_to = $('#date_to').val();$source = ''; | |
$('#teamSelector').change(function(){ | |
$selected_team = $(this).val(); | |
$.ajax({ | |
url : $baseUrl + "/public/staff/staff/return-json-staff", | |
type : "POST", | |
data : 'selected_team='+$selected_team+'&date_from='+$date_from+'$date_to='+$date_to+'&source='+$source | |
}).done(function($response){ | |
var obj = jQuery.parseJSON($response); |
This file contains 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
$(document).ready(function(){ | |
$('.hover').hide(); | |
$('tr').hover( | |
//over | |
function(){ | |
$(this).find('.hover').show(); | |
} | |
, | |
//out |
This file contains 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
$('#loadingGif').hide(); | |
$('#inlineSubmit, #searchSubmit,.load,.payterm').click(function(){ | |
$('#loadingGif').show(); | |
}) |