web access very cool
This commit is contained in:
1 parent
760ddd06ee
commit
482fb1edc4
51 files changed
+1780
-350
No files matched your search
@@ -66,6 +66,12 @@ class TranslationController extends Controller
|
||||
if(isset($_POST['Translation']))
|
||||
{
|
||||
$model->attributes=$_POST['Translation'];
|
||||
|
||||
$model->textEnUp = mb_strtoupper($model->textEn, 'UTF-8');
|
||||
$model->textRuUp = mb_strtoupper($model->textRu, 'UTF-8');
|
||||
$model->textZhUp = mb_strtoupper($model->textZh, 'UTF-8');
|
||||
|
||||
|
||||
if($model->save())
|
||||
$this->redirect(array('view','id'=>$model->id));
|
||||
}
|
||||
@@ -90,6 +96,11 @@ class TranslationController extends Controller
|
||||
if(isset($_POST['Translation']))
|
||||
{
|
||||
$model->attributes=$_POST['Translation'];
|
||||
|
||||
$model->textEnUp = mb_strtoupper($model->textEn, 'UTF-8');
|
||||
$model->textRuUp = mb_strtoupper($model->textRu, 'UTF-8');
|
||||
$model->textZhUp = mb_strtoupper($model->textZh, 'UTF-8');
|
||||
|
||||
if($model->save())
|
||||
$this->redirect(array('view','id'=>$model->id));
|
||||
}
|
||||
@@ -141,7 +152,29 @@ class TranslationController extends Controller
|
||||
|
||||
public function actionJson()
|
||||
{
|
||||
|
||||
$dataArray = Translation::model()->findAll();
|
||||
/*
|
||||
foreach ($dataArray as &$data)
|
||||
{
|
||||
if (empty($data->textEnUp))
|
||||
{
|
||||
$data->textEnUp = mb_strtoupper($data->textEn, 'UTF-8');
|
||||
}
|
||||
|
||||
if (empty($data->textRuUp))
|
||||
{
|
||||
$data->textRuUp = mb_strtoupper($data->textRu, 'UTF-8');
|
||||
}
|
||||
|
||||
if (empty($data->textZhUp))
|
||||
{
|
||||
$data->textZhUp = mb_strtoupper($data->textZh, 'UTF-8');
|
||||
}
|
||||
|
||||
|
||||
$data->save();
|
||||
}*/
|
||||
|
||||
$this->layout = false;
|
||||
header('Content-type: application/json');
|
||||
|
||||
Reference in new issue
Block a user