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
public function find() { | |
$this->Country->recursive = -1; | |
if ($this->request->is('ajax')) { | |
$this->autoRender = false; | |
$country_name = $this->request->data['Country']['name']; | |
$results = $this->Country->find('all', array( | |
'conditions' => array('Country.name LIKE ' => '%' . $country_name . '%') | |
)); | |
foreach($results as $result) { |
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 | |
App::uses('AppController', 'Controller'); | |
class CountriesController extends AppController { | |
public $helpers = array('Js'); | |
public function select() { | |
$countries = $this->Country->find('list'); | |
$states = 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() { | |
$('#countries').change(function() { | |
var selectedValue = $(this).val(); | |
var targeturl = $(this).attr('rel') + '?id=' + selectedValue; | |
$.ajax({ | |
type: 'get', | |
url: targeturl, | |
beforeSend: function(xhr) { |
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
/* | |
Navicat MySQL Data Transfer | |
Source Server : localhost_3306 | |
Source Server Version : 50173 | |
Source Host : localhost:3306 | |
Source Database : smart2 | |
Target Server Type : MYSQL | |
Target Server Version : 50173 |
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
/* | |
Navicat MySQL Data Transfer | |
Source Server : localhost_3306 | |
Source Server Version : 50173 | |
Source Host : localhost:3306 | |
Source Database : smart2 | |
Target Server Type : MYSQL | |
Target Server Version : 50173 |
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 | |
App::uses('AppModel', 'Model'); | |
/** | |
* Department Model | |
* | |
* @property Project $Project | |
*/ | |
class Country extends AppModel { | |
public $hasMany = 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
<?php | |
App::uses('AppController', 'Controller'); | |
/** | |
* Helps Controller | |
* | |
* @property Help $Help | |
* @property PaginatorComponent $Paginator | |
*/ | |
class StatesController extends AppController { | |
var $helpers = array('Html','Js'); |
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
<table width="800px" cellspacing="0" cellpadding="5" border="1" style="border-collapse:collapse"><tbody><tr><th>ID</th> <th>Task Name</th> <th>Assigned Date</th> <th>Action</th> </tr><tr><td>1347 </td><td><a href="http://controls.localhost.com/issues/view/1347" target="_blank">Inventory of Authorized and Unauthorized Devices </a></td><td><span class="aBn" data-term="goog_281741611" tabindex="0"><span class="aQJ">2014-09-12</span></span></td><td><a href="http://controls.localhost.com/issues/email_close_issue/1347/5413256b-12a0-4f00-895d-10ad7f000001" target="_blank">Close Task</a></td></tr><tr><td>1348 </td><td><a href="http://controls.localhost.com/issues/view/1348" target="_blank">Test monthly control</a></td><td><span class="aBn" data-term="goog_281741612" tabindex="0"><span class="aQJ">2014-09-12</span></span></td><td><a href="http://controls.localhost.com/issues/email_close_issue/1348/5413256c-1c08-42ec-9cb0-10ad7f000001" target="_blank">Close Task</a></td></tr><tr><td>1349 </td><td><a href="http://contro |
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
$email_body = '<table width="800px" cellspacing="0" cellpadding="5" border="1" style="border-collapse: collapse;">' | |
. '<tr><th>ID</th> <th>Task Name</th> <th>Assigned Date</th> <th>Action</th> </tr>'; | |
$task_view_link = '<a href="' . APP_URL . '/issues/view/' . $issue_id . '">' . $task_name . '</a>'; | |
$close_issue = '<a href="' . APP_URL . '/issues/email_close_issue/' . $issue_id . '/' . $issue_close_string . '">Close Task</a>'; | |
$email_body .= '<tr><td>' . $issue_id . ' </td><td>' . $task_view_link . '</td><td>' . $target_email_date . '</td><td>' . $close_issue . '</td></tr>'; | |
$email_body .='</table>'; |
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
$email_body = "<table width='800px' cellspacing='0' cellpadding='5' border='1' style='border-collapse: collapse;'>" | |
. "<tr><th>ID</th> <th>Task Name</th> <th>Assigned Date</th> <th>Action</th> </tr>"; | |
$task_view_link = "<a href=" . APP_URL . "/issues/view/" . $issue_id . ">" . $task_name . "</a>"; | |
$close_issue = "<a href=" . APP_URL . "/issues/email_close_issue/" . $issue_id . "/" . $issue_close_string . ">Close Task</a>"; | |
$email_body .= "<tr><td>" . $issue_id . " </td><td>" . $task_view_link . "</td><td>" . $target_email_date . "</td><td>" . $close_issue . "</td></tr>"; | |
$email_body .="</table>"; |