Example #1
0
<?php

if (empty($_POST['difficultN']) || empty($_POST['name']) || empty($_POST['categoryN']) && empty($_POST['muscleGroupN'])) {
    $var['er'] = $testo['errors']['emptyField'];
} else {
    if (isset($_POST['freeN'])) {
        $var['yn'] = 'yes';
    } else {
        $var['yn'] = 'no';
    }
    $var['newID'] = 'video' . time();
    $dataDB->setColDt(array('id', 'muscleGroup', 'difficult', 'free', 'category'));
    $dataDB->setValDt(array($var['newID'], $_POST['muscleGroupN'], $_POST['difficultN'], $var['yn'], $_POST['categoryN']));
    $dataDB->insert('video');
    for ($i = 0; $i < $testo['str']['num']; $i++) {
        $txtDB->setColDt(array('languages', 'object', 'type', 'rifTxt', 'txt'));
        $txtDB->setValDt(array($testo['str']['id'][$i], 'video', 'input', $var['newID'], txaTOdb($_POST['name'], true)));
        $txtDB->insert('txtData');
    }
    Redieasy('index.php?token=' . $_GET['token']);
}
Example #2
0
        $txtDB->setValWh(array($_POST['id'], $var['lang']));
        $var['inputTxt'] = 'input';
        $var['txt2Mod'] = $_POST['txt'];
        $var['table'] = 'txtWeb';
        break;
    case 'video':
        //Cambio Testo Video
        $txtDB->setColWh(array('rifTxt', 'languages'));
        $txtDB->setValWh(array($_POST['id'], $var['lang']));
        $var['inputTxt'] = 'input';
        $var['txt2Mod'] = $_POST['txt'];
        $var['table'] = 'txtData';
        break;
}
if (!isset($_POST['round'])) {
    if (!empty($_POST['txt'])) {
        $txtDB->setColDt(array('txt'));
        $txtDB->setValDt(array(txaTOdb($_POST['txt'], true)));
        $txtDB->update($var['table']);
        Redieasy('index.php?token=' . $_POST['token']);
    } else {
        $var['er'] = $testo['errors']['emptyField'];
    }
}
$txtDB->resVar();
/*switch ($_POST['type']){
     case 'webTxt': //Cambio Testo Sito
           
     break;
  }
  */
Example #3
0
<?php

if (empty($_POST['pagesN']) || empty($_POST['sectionsN']) || empty($_POST['txt']) || empty($_POST['rifTxt'])) {
    $var['er'] = $testo['errors']['emptyField'];
} else {
    $txtDB->setColWh(array('rifTxt'));
    $txtDB->setValWh(array($_POST['rifTxt']));
    $res = $txtDB->select('txtWeb');
    if (!isset($res['id'])) {
        for ($i = 0; $i < $testo['str']['num']; $i++) {
            $txtDB->setColDt(array('languages', 'pages', 'sections', 'rifTxt', 'txt'));
            $txtDB->setValDt(array($testo['str']['id'][$i], $_POST['pagesN'], $_POST['sectionsN'], $_POST['rifTxt'], txaTOdb($_POST['txt'], true)));
            $txtDB->insert('txtWeb');
        }
        Redieasy('index.php?token=' . $_GET['token']);
    } else {
        $var['er'] = $testo['errors']['rifAlreadyPresent'];
    }
}
Example #4
0
<?php

if (empty($_POST['typeN']) || empty($_POST['name']) || $_POST['typeN'] !== $liste['type']['idc'][0] && empty($_POST['whoN'])) {
    $var['er'] = $testo['errors']['emptyField'];
} else {
    if ($_POST['typeN'] == $liste['type']['idc'][0]) {
        $mainDB->setColWh(array('who'));
        $mainDB->setValWh(array($_POST['whoN']));
        $res = $dataDB->select('category');
    } else {
        $res['id'] = '';
    }
    if (empty($res['id'])) {
        $var['newID'] = 'cate' . time();
        $mainDB->setColDt(array('id', 'type', 'who'));
        $mainDB->setValDt(array($var['newID'], $_POST['typeN'], $_POST['whoN']));
        $mainDB->insert('category');
        for ($i = 0; $i < $testo['str']['num']; $i++) {
            $txtDB->setColDt(array('languages', 'pages', 'sections', 'rifTxt', 'txt'));
            $txtDB->setValDt(array($testo['str']['id'][$i], 'category', 'commonTxt', $var['newID'], txaTOdb($_POST['name'], true)));
            $txtDB->insert('txtWeb');
        }
        Redieasy('index.php?token=' . $_GET['token']);
    } else {
        $var['er'] = $testo['errors']['catAlreadySel'];
    }
}