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 | |
$values = $request->getParameter($form->getName()); | |
$values['yourdate'] = NEW MODIFIED DATE VALUE; | |
$form->bind($values, $request->getFiles($form->getName())); | |
$o = $form->getObject(); | |
$o->save(); | |
?> |
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
<script type="text/javascript"> | |
$.ajax({ | |
type: 'POST', | |
cache: false, | |
data: 'params=' + escape(JSON.stringify(structure)).replace(new RegExp("\\+", "g" ),"%2B"), | |
url: '/adm.php/sendregexp', | |
success: function(response) { | |
var result = jQuery.parseJSON(response); | |
if (result.code == 300) { |
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 with other database | |
// $instance - object with new database data | |
new sfDoctrineDatabase(array( | |
'name' => 'instance', | |
'dsn' => 'mysql:host=' . $instance->getInstanceDbHost() . ';dbname=' . $instance->getInstanceDbName(), | |
'username' => $instance->getInstanceDbUser(), | |
'password' => $instance->getInstanceDbPassword(), | |
)); |
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 | |
$this->locations = Doctrine_Core::getTable('location') | |
->createQuery('l') | |
->orderBy("CASE url_slug WHEN :slug THEN '' ELSE name END") | |
->execute(array('slug' => 'london')); | |
>? |
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
#Gzip | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript | |
</ifmodule> | |
#End Gzip |
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
SELECT table_schema, | |
CONCAT(ROUND(SUM(data_length/(1024*1024)),2),'M') data, | |
CONCAT(ROUND(SUM(index_length/(1024*1024)),2),'M') idx, | |
CONCAT(ROUND((SUM(data_length+index_length)/(1024*1024)),2),'M') total_size | |
FROM information_schema.tables | |
GROUP BY table_schema | |
ORDER BY data_length+index_length DESC; | |
SHOW TABLE STATUS FROM etracker; |
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 | |
/** | |
* Function generates password depend on configuration sets | |
* | |
* @param int $length | |
* @param boolean $add_dashes | |
* @param string $available_sets | |
* @return string | |
*/ | |
public static function generateStrongPassword($length = 10, $add_dashes = false, $available_sets = 'luds') |
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
var int = $(this).attr('id').match(/\d+/); |
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
<html> | |
<body> | |
<script type="text/javascript"> | |
var BrowserDetect = { | |
init: function () { | |
this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; | |
this.version = this.searchVersion(navigator.userAgent) | |
|| this.searchVersion(navigator.appVersion) | |
|| "an unknown version"; | |
this.OS = this.searchString(this.dataOS) || "an unknown OS"; |
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 FlxZipArchive extends ZipArchive | |
{ | |
/** | |
* Add a Dir with Files and Subdirs to the archive | |
* | |
* @param string $location Real Location | |
* @param string $name Name in Archive |
NewerOlder