H69UNtblNBNpha2dtB1Odn8qYp1Qk5NK2gi7yfceofo9N
/
home
/
ymswebso
/
public_html
/
buydotcom
/
app
/
View
/
Managecountries
/
Nama File / Folder
Size
Action
admin_index.ctp
9.132KB
Hapus
Edit
Rename
<div id="styledModal" class="modal modal-styled fade"> <form name="add-extension-form" id="add-extension-form" action="<?php echo $_SERVER['REQUEST_URI'];?>" method="post"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Add New Country</h4> </div> <div class="col-md-12" style="border-radius:0 ; padding: 0px 0px 3px 0; background-color:#263542; "></div> <!-- /.modal-header --> <div class="modal-body margin-top-20"> <div class="row"> <div class="col-md-3 mediumtext lato-regular-font skytext text-left-from-right-mobile nopadding"> Country Name<span class="redtext">*</span></div> <div class="col-md-8 padding-left-pc-15 padding-right-pc-15"> <input type="text" name="name" id="name" value="" class="form-control"> </div> </div> <div class="row margin-top-25"> <div class="col-md-3 mediumtext lato-regular-font skytext text-left-from-right-mobile nopadding"> Status </div> <div class="col-md-8 padding-left-pc-15 padding-right-pc-15"> <select name="status" id="status" class="form-control skytext lato-regular-font"> <option value="1">Active</option> <option value="0">Inactive</option> </select> </div> </div> </div> <!-- /.modal-body --> <div class="modal-footer"> <button type="button" class="btn btn-white uppercase" data-dismiss="modal">Close</button> <button type="submit" class="btn btn-green uppercase">Submit</button> </div> <!-- /.modal-footer --> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </form> </div> <div class="content"> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="portlet"> <h2 class="portlet-title"> <u>Manage Countries(<?php echo $TotalCountries; ?>)</u> <u class="pull-right margin-top-mobile-15-pc-minus-7" style="border-bottom:none;"> <a data-toggle="modal" href="#styledModal" class="btn btn-green"><span class="fa fa-plus-square" style="font-size:14px;"></span> Add New Country</a> </u> </h2> <div class="portlet-body"> <table cellpadding="0" cellspacing="0" border="0" width="100%" class="custom-table"> <thead> <tr> <th class="padding-left-10" width="15%">Country ID</th> <th style="text-align:center;" width="40%">Country Name</th> <th style="text-align:center;" width="15%">Status</th> <th style="text-align:center;" width="20%">Action</th> </tr> </thead> <thead> <?php //print_r($brands); foreach($countries as $country) {?> <tr> <td colspan="5" height="5"></td> </tr> <tr> <td bgcolor="#F2F2F2" class="padding-left-25 padding-top-11 padding-bottom-11">#<?php echo $country['Country']['id']; ?></td> <td bgcolor="#F2F2F2" style="text-align:center;"><?php echo $country['Country']['name']; ?></td> <td bgcolor="#F2F2F2" style="text-align:center;"> <?php if($country['Country']['status'] == '1'){?> <span class="whitetext completed"><strong>Active</strong></span> <?php }else{?> <span class="whitetext cancelled"><strong>Inactive</strong></span> <?php }?> </td> <td bgcolor="#F2F2F2" style="text-align:center;"> <a href="/admin/managecountries/updatestatus/1/<?php echo $country['Country']['id']; ?>"><img src="/backend/img/active.png"></a> <img src="/backend/img/backslash.png"><a href="/admin/managecountries/updatestatus/0/<?php echo $country['Country']['id']; ?>"><img src="/backend/img/inactive.png"></a><img src="/backend/img/backslash.png"><a data-toggle="modal" href="#styledModal<?php echo $country['Country']['id']; ?>"><img src="/backend/img/edit.png"></a><img src="/backend/img/backslash.png"> <?php echo $this->Form->postLink( $this->Html->image('../backend/img/delete.png', array("alt" => __('Delete'), "title" => __('Delete'))), array('action' => 'delete', $country['Country']['id']), array('escape' => false, 'confirm' => __('Delete Opration will remove the data permanently form database. Are sure to delete this record.')) ); ?> </td> </tr> <div id="styledModal<?php echo $country['Country']['id']; ?>" class="modal modal-styled fade"> <form name="edit-extension-form" id="edit-extension-form" action="<?php echo $_SERVER['REQUEST_URI'];?>" method="post"> <input type="hidden" name="id" id="id" value="<?php echo $country['Country']['id']; ?>"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Edit Country</h4> </div> <div class="col-md-12" style="border-radius:0 ; padding: 0px 0px 3px 0; background-color:#263542; "></div> <!-- /.modal-header --> <div class="modal-body margin-top-20"> <div class="row"> <div class="col-md-3 mediumtext lato-regular-font skytext text-left-from-right-mobile nopadding"> Country Name<span class="redtext">*</span> </div> <div class="col-md-8 padding-left-pc-15 padding-right-pc-15"> <?php $countryname = ClassRegistry::init('Country'); $countrydatas = $countryname->find('all', array('conditions' => array('Country.id' => $country['Country']['id']))); ?> <input type="text" name="name" id="name" value="<?php echo $countrydatas[0]['Country']['name']; ?>" class="form-control"> </div> </div> <div class="row margin-top-25"> <div class="col-md-3 mediumtext lato-regular-font skytext text-left-from-right-mobile nopadding"> Status </div> <div class="col-md-8 padding-left-pc-15 padding-right-pc-15"> <select name="status" id="status" class="form-control skytext lato-regular-font"> <option value="1" <?php if($countrydatas[0]['Country']['status'] == '1'){?>selected="selected"<?php }?>>Active</option> <option value="0" <?php if($countrydatas[0]['Country']['status'] == '0'){?>selected="selected"<?php }?>>Inactive</option> </select> </div> </div> </div> <!-- /.modal-body --> <div class="modal-footer"> <button type="button" class="btn btn-white uppercase" data-dismiss="modal">Close</button> <button type="submit" class="btn btn-green uppercase">Submit</button> </div> <!-- /.modal-footer --> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </form> </div> <?php }?> <tr> <td colspan="5" height="20"></td> </tr> <tr> <td colspan="5" class="text-center"> <ul class="pagination"> <?php echo $this->Paginator->prev(__('prev'), array('tag' => 'li'), null, array('tag' => 'li','class' => 'disabled','disabledTag' => 'a')); echo $this->Paginator->numbers(array('separator' => '','currentTag' => 'a', 'currentClass' => 'active','tag' => 'li','first' => 1)); echo $this->Paginator->next(__('next'), array('tag' => 'li','currentClass' => 'disabled'), null, array('tag' => 'li','class' => 'disabled','disabledTag' => 'a')); ?> </ul> </td> </tr> </thead> </table> </div> <!-- /.portlet-body --> </div> <!-- /.portlet --> </div> <!-- /.col --> </div> <!-- /.row --> </div> <!-- /.container --> </div> <!-- .content -->