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
$this->widgetSchema['membership_start'] = new sfWidgetFormFilterDate( | |
array( | |
'from_date' => new sfWidgetFormJQueryDate(array( | |
'config' => '{}', | |
'culture' => 'es', | |
'config' => "{firstDay: 1, dayNamesMin: ['Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa'], | |
monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre']}", | |
'date_widget' => new sfWidgetFormDate(array('format' => '%day%-%month%-%year%')) | |
)), | |
'to_date' => new sfWidgetFormJQueryDate(array( |
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 CallAPI($method, $url, $data = false) | |
{ | |
$curl = curl_init(); | |
switch ($method) | |
{ | |
case "POST": | |
curl_setopt($curl, CURLOPT_POST, 1); | |
if ($data) |
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
test: | |
doctrine: | |
param: | |
dsn: 'sqlite::memory:' | |
# dsn: 'mysql:host=localhost;dbname=clipkit_dev' | |
# dsn: 'sqlite:%SF_DATA_DIR%/test-doctrine.db' | |
statistic: | |
param: | |
dsn: 'sqlite::memory:' | |
tracking: |
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 | |
/** | |
* Doctrine form base class that makes it pretty easy to embed one or multiple related forms including creation forms. | |
* | |
* @package ahDoctrineEasyEmbeddedRelationsPlugin | |
* @subpackage form | |
* @author Daniel Lohse <[email protected]> | |
* @author Krzysztof Kotowicz <kkotowicz at gmail dot com> | |
* @author Gadfly <[email protected]> |
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 rounddowntohundred($theNumber) { | |
if (strlen($theNumber)<3) { | |
$theNumber=$theNumber; | |
} else { | |
$theNumber=substr($theNumber, 0, strlen($theNumber)-2) . "00"; | |
} | |
return $theNumber; | |
} |
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
$widgetFormSettings = array( | |
'config' => '{}', | |
'culture' => 'es', | |
'config' => "{firstDay: 1, dayNamesMin: ['Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa'], monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre']}", | |
'date_widget' => new sfWidgetFormDate(array('format' => '%day%-%month%-%year%', 'years' => array_combine(range(2013, 2020), range(2013, 2020)))), | |
'image' => '/images/calendar.png' | |
); | |
$this->widgetSchema['published_at'] = new sfWidgetFormJQueryDate($widgetFormSettings); |
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
# NOTE: These patterns take into account the additional log-line information passed to the logstash listener from rsyslog. YMMV. | |
DHCPD ((%{SYSLOGTIMESTAMP:timestamp})\s*(%{HOSTNAME:hostname})\s*dhcpd\S+\s*(%{WORD:dhcp_action})?.*[for|on] (%{IPV4:dhcp_client_ip})?.*[from|to] (%{COMMONMAC:dhcp_client_mac})?.*via (%{USERNAME:interface})) | |
IPTABLES ((%{SYSLOGTIMESTAMP:nf_timestamp})\s*(%{HOSTNAME:nf_host})\s*kernel\S+\s*(%{WORD:nf_action})?.*IN=(%{USERNAME:nf_in_interface})?.*OUT=(%{USERNAME:nf_out_interface})?.*MAC=(%{COMMONMAC:nf_dst_mac}):(%{COMMONMAC:nf_src_mac})?.*SRC=(%{IPV4:nf_src_ip}).*DST=(%{IPV4:nf_dst_ip}).*PROTO=(%{WORD:nf_protocol}).?*SPT=(%{INT:nf_src_port}?.*DPT=%{INT:nf_dst_port}?.*)) | |
DNS ((%{MONTHDAY:day})-(%{MONTH:month})-(%{YEAR:year}) (%{TIME:timestamp}) client (%{IPV4:dns_client_ip})#(%{NONNEGINT:dns_uuid})?.*query: (%{HOSTNAME:dns_dest}) (%{WORD:dns_type}) (%{WORD:dns_record})?.*(%{IPV4:dns_server})) | |
PGSQL ((%{SYSLOGTIMESTAMP:pgsql_timestamp}) (%{HOSTNAME:pgsql_hostname})?.*SAST >(%{WORD:pgs |
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
//NO IMAGEN | |
$this->widgetSchema['mp3'] = new sfWidgetFormInputFileEditable( | |
array( | |
"edit_mode" => true, | |
"file_src" => '/uploads/mp3/'.$this->getObject()->getMp3(), | |
"is_image" => false, | |
"with_delete" => true, | |
'delete_label' => 'Eliminar MP3' | |
)); |
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
./symfony plugin:install SfTCPDFPlugin | |
IMPORTANTE: Copiar clase de la libreria de plugins/sfTCPDFPlugin/lib copiar de proyecto existente (camara o bariloche). | |
LOGO del PDF: Esta dentro de /plugins/sfTCPDFPlugin/lib/tcpdf/images/logo.png | |
Archivo: apps/backend/config/pdf_configs.yml | |
Snipet: | |
$newPdf = $this->createPdf($this->getPartial('report', array( | |
'previusCc'=>$this->previusCc, | |
'ccEntrySubtotal'=>$this->ccEntrySubtotal, | |
'date'=>$this->date, | |
'arrEntries'=>$this->arrEntries, |
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
El plugin es el jquery chained, esta en propos (productos) y en b2000 (articulos) | |
Necesitamos del cache los archivos: | |
_form_fieldset | |
_form_field | |
_form | |
editSuccess | |
newSuccess | |
Entre los partial se van pasando el collection para armar el dropdown, empezando de newSuccess o editSuccess hacia _form->_form_fieldset->_form_field | |