本文整理汇总了PHP中Params::urlIconModulThumbsDirectory方法的典型用法代码示例。如果您正苦于以下问题:PHP Params::urlIconModulThumbsDirectory方法的具体用法?PHP Params::urlIconModulThumbsDirectory怎么用?PHP Params::urlIconModulThumbsDirectory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Params
的用法示例。
在下文中一共展示了Params::urlIconModulThumbsDirectory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
</div>
</div>
<div class="mws-form-row">
<?php
echo $form->labelEx($model, 'notelp_karyawan');
?>
<div class="mws-form-item ">
<?php
echo $form->textField($model, 'notelp_karyawan', array('style' => 'width:110px;', 'readonly' => true, 'onkeypress' => "return \$(this).focusNextInputField(event)"));
?>
</div>
</div>
</td>
<td style="width:200px;height:200px;">
<img src="<?php
echo Params::urlIconModulThumbsDirectory() . 'kecil_' . $model->photo_karyawan;
?>
" width="200" height=200" >
</td>
</tr>
</table>
</div>
<?php
$this->endWidget();
?>
<hr/>
<div class="tab">
<!-- <ul>
<li class="tab"><a title="Pendidikan Karyawan"href="<?php
echo $this->createUrl('karyawan/pendidikanKaryawan/id/' . $model->karyawan_id);
?>
示例2: actionDelete
/**
* Deletes a particular model.
* If deletion is successful, the browser will be redirected to the 'admin' page.
* @param integer $id the ID of the model to be deleted
*/
public function actionDelete($id)
{
if (Yii::app()->request->isPostRequest) {
// we only allow deletion via POST request
$model = $this->loadModel($id);
$img = $model->photo_karyawan;
if ($model->delete()) {
if (file_exists(Params::urlIconModulDirectory() . $img) && file_exists(Params::urlIconModulThumbsDirectory() . 'kecil_' . $img) && $img != null) {
unlink(Params::urlIconModulDirectory() . $img);
unlink(Params::urlIconModulThumbsDirectory() . 'kecil_' . $img);
}
}
// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
if (!isset($_GET['ajax'])) {
$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
}
} else {
throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');
}
}