Jump to content

crazycoder

Members
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About crazycoder

  • Rank
    Member
  1. I am using jQuery Combogrid http://combogrid.justmybit.com/ for autocomplete. Currently it supports only single selection. How can I make it to select multiple rows by adding a checkbox in the first column? Please help.
  2. Did you try printing the $row_first values using print_r($row_first)
  3. You will have to return the selected value through GET parameter, and if it has value select it using conditional statement.
  4. Whether table field has value in it?
  5. Yes. You will require the loop to delete the images.
  6. For deleting the file using unlink, absolute path of the file is required where as pprofilepic contains the relative path.
  7. I added "style"=>"width:100%" in CHtml::textField htmlOptions and was able to change the width of column
  8. I am using Yii 1.1 CGridView with 'raw' cell type. The cell contains text field generated using CHtml::textField. Here I cannot change the width of the column using headerHtmlOptions or htmlOptions. Please help. $this->widget('zii.widgets.grid.CGridView', array( 'id'=>'mbook-grid', 'itemsCssClass'=>'table table-bordered table-condensed table-hover table-striped dataTable', 'dataProvider'=>$model->search(), 'afterAjaxUpdate'=>'calcquantity', 'enablePagination' => true, 'pagerCssClass'=>'dataTables_paginate paging_bootstrap table-pagination', 'pager' => array('header'=>'','htmlOptions'=>array('class'=>'pagination')), 'columns' => array( array( 'class' => 'CCheckBoxColumn', 'id'=>'project_estimate_id', 'htmlOptions'=>array('style' => 'display:none'), 'headerHtmlOptions'=>array('style' => 'display:none'), 'selectableRows'=>2, 'value'=>'$data["project_estimate_id"]', 'checked'=>'true', ), array(name=>'description','value'=>'CHtml::textField("ProjectMBookGrid[description_".$data["project_estimate_id"]."]",$data["description"],array("class"=>"gridfield"))','type'=>'raw','header'=>'Description','headerHtmlOptions'=>array('style'=>'width: 5%;')), array(name=>'length','value'=>'CHtml::textField("ProjectMBookGrid[length_".$data["project_estimate_id"]."]",$data["length"],array("class"=>"gridfield","style"=>"text-align: right"))','type'=>'raw','header'=>'Length','headerHtmlOptions'=>array('style'=>'width:5%')), array(name=>'breadth','value'=>'CHtml::textField("ProjectMBookGrid[breadth_".$data["project_estimate_id"]."]",$data["breadth"],array("class"=>"gridfield","style"=>"text-align: right"))','type'=>'raw','header'=>'Breadth','htmlOptions'=>array('style'=>'text-align: right')), array(name=>'quantity','value'=>'CHtml::textField("ProjectMBookGrid[quantity_".$data["project_estimate_id"]."]",$data["quantity"],array("class"=>"gridfield","style"=>"text-align: right"))','type'=>'raw','header'=>'Quantity','htmlOptions'=>array('style'=>'text-align: right')), ), 'htmlOptions'=>array('class'=>'grid-view table-responsive hide-x-scroll'), ))
  9. Finally I wrote the command in php and executed the php file using windows task scheduler. $path = Yii::app()->basePath . '/data/backup/'; $file=$path."pentium.backup"; unlink($file); putenv("PGPASSWORD=postgres"); $dumpcmd = array("pg_dump", "-i", "-U", escapeshellarg("postgres"), "-F", "c", "-b", "-v", "-f", escapeshellarg($file), escapeshellarg("pentium")); exec( join(' ', $dumpcmd), $cmdout, $cmdresult ); putenv("PGPASSWORD");
  10. I am using Yii 1.1 for development. In my site I am using accessControl for authentication and it is working fine. Now I want to password protect an action from the logged in users. An option is to create an page for entering the password and on submission store it in session. If the user tries to view the action then check the session and if it is not set redirect the user to the page for entering the password. How can I achieve this? Is it possible using accessControl as it is already used for login authentication?
  11. If I execute the PHP file through command line then it successfully executes and the back up file is generated. Problem is when I access through browser.
  12. Is there any other way I can run the pg_dump command using php. I have tried with exec() but that also was not working.
  13. Seems there is no error here because if I double click to run the cron.bat file then the backup file is generated. Now I have tried changing the path to forward slashes in system() function,but it is not working.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.