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
// ==UserScript== | |
// @name Binance link futures | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Link to futures | |
// @author Sminem Bitnada | |
// @grant none | |
// @include https://www.binance.com/en/futures/* | |
// @include https://www.binance.com/br/futures/* | |
// @require https://code.jquery.com/jquery-2.1.4.min.js |
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
array( | |
'opcoes_clientes' => array( | |
'opcoes_clientes' => array( | |
(int) 0 => '2', | |
(int) 1 => '3', | |
(int) 2 => '4', | |
(int) 3 => '5' | |
) | |
), | |
'Cliente' => array( |
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
array( | |
'id' => '4', | |
'Cliente' => array( | |
'id' => '4', | |
'nome' => 'ABES', | |
'email' => '[email protected]', | |
'telefone' => '', | |
'mais' => '' | |
), | |
'opcoes_clientes' => array( |
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 | |
echo $this->Form->create("Cliente"); | |
?> | |
<h3>Visualizar dados do Clientes</h3><br/> | |
<label>Cliente:</label> | |
<input type="hidden" name="id" value="<?php echo $clientes['Cliente']['id']; ?>"/> | |
<?php | |
$options = array('class' => 'form-control'); | |
echo $this->Form->hidden('id'); |
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
echo $this->Form->create("Cliente"); | |
echo $this->Form->input('nome', $options); | |
echo $this->Form->input('email', $options); | |
echo $this->Form->input('telefone', $options); | |
echo $this->Form->input('mais', $options); | |
foreach($opcoes as $data): | |
echo $this->Form->hidden('opcoes_clientes.opco_id', array('value'=> $id)); | |
echo $this->Form->hidden('opcoes_clientes.cliente_id', array('value'=> $clientes['Cliente']['id'])); | |
echo $this->Form->input('opcoes_clientes.host', $options); | |
echo $this->Form->input('opcoes_clientes.user', $options); |
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
if ($this->request->is('post') || $this->request->is('put')) { | |
if ($this->Cliente->save($this->request->data)) { | |
$this->Cliente->saveAssociated($this->request->data); | |
$this->Session->setFlash('O cliente foi editado com sucesso!', | |
'alert', array( 'plugin' => 'BoostCake', 'class' => 'alert-success' )); | |
$this->redirect(array('action' => 'index')); | |
} else { | |
$this->Session->setFlash('O cliente não foi editado. Tente novamente.', 'alert', array( | |
'plugin' => 'BoostCake', 'class' => 'alert-error' | |
)); |
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
public $hasAndBelongsToMany = array ( | |
'opcoes_clientes' => array ( | |
'className' => 'opcoes' , | |
) | |
); |
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
public $hasMany = array( | |
'opcoes_clientes' => array ( | |
'className' => 'Opcoes_clientes', | |
'unique' => false | |
) | |
); |