<?php session_start(); ob_start(); require '../../../Controller/Registry.php'; require '../../../Controller/conn.php'; //require('../../../Controller/preProcessor.php'); require '../ClasseTimes.php'; $Times = new Times(); //$RodacadastroTimes = new RodaDados(); $idTime = $Times->CriarIntxId($_REQUEST['idTime']); $Times->deletaCadastroTimes($Times);
$conditions[] = "Product.status=" . $_GET['product']['status']; } if (!empty($_GET['data']['q'])) { $conditions[] = "Product.name like '%" . $_GET['data']['q'] . "%'"; } if ($_GET['industryid']) { $conditions[] = "Product.industry_id =" . $_GET['industryid']; } if ($_GET['provinceid']) { $conditions[] = "c.province_code_id =" . $_GET['provinceid']; } if ($_GET['FromDate'] && $_GET['FromDate'] != "None" && $_GET['ToDate'] && $_GET['ToDate'] != "None") { $condition = "Product.created BETWEEN "; $condition .= Times::dateConvert($_GET['FromDate']); $condition .= " AND "; $condition .= Times::dateConvert($_GET['ToDate']); $conditions[] = $condition; } } } $amount = $product->findCount(null, $conditions, "Product.id", null); unset($joins); $joins[] = "LEFT JOIN {$tb_prefix}companies c ON c.id=Product.company_id"; $page->setPagenav($amount); //print_r($amount); //exit; $fields = "Product.id,Product.company_id AS CompanyID,c.id AS CID,c.name AS companyname,Product.name AS ProductName,Product.status AS ProductStatus,Product.created,Product.ifcommend as Ifcommend, Product.state as ProductState,Product.picture as ProductPicture "; $result = $product->findAll($fields, $joins, $conditions, "Product.id DESC", $page->firstcount, $page->displaypg); if (!empty($result)) { for ($i = 0; $i < count($result); $i++) { $result[$i]['pubdate'] = date("Y-m-d", $result[$i]['created']);
$vals = $_POST['data']['member']; if (!empty($_POST['data']['userpass'])) { if (!pb_strcomp($_POST['data']['userpass'], $_POST['data']['re_userpass'])) { flash("invalid_password"); } else { $vals['userpass'] = $member->authPasswd($_POST['data']['userpass']); } } if (!empty($_POST['data']['trusttype'])) { $vals['trusttype_ids'] = implode(",", $_POST['data']['trusttype']); } if (isset($_POST['data']['service_start_date'])) { $vals['service_start_date'] = Times::dateConvert($_POST['data']['service_start_date']); } if (isset($_POST['data']['service_end_date'])) { $vals['service_end_date'] = Times::dateConvert($_POST['data']['service_end_date']); } if (!empty($member_id)) { $vals['modified'] = $time_stamp; if (!empty($vals['space_name'])) { $member->updateSpaceName(array('id' => $member_id), $vals['space_name']); } $result = $member->save($vals, "update", $member_id); } else { $vals['status'] = 1; $vals['created'] = $vals['modified'] = $time_stamp; $result = $member->save($vals); } if (!$result) { flash(); }
if (!empty($_POST['data']['adminfield'])) { $vals = $_POST['data']['adminfield']; if ($_POST['auth'] == 1) { if (!empty($_POST['priv']) && is_array($_POST['priv'])) { $vals['permissions'] = implode(",", $_POST['priv']); } } else { $vals['permissions'] = ''; } if (!empty($_POST['data']['adminer']['user_pass'])) { $vals['user_pass'] = $member->authPasswd($_POST['data']['adminer']['user_pass']); } $adminer->primaryKey = "member_id"; if (!empty($_POST['data']['expired'])) { include LIB_PATH . "time.class.php"; $vals['expired'] = Times::dateConvert($_POST['data']['expired']); } if (!empty($_POST['member_id'])) { $member_id = intval($_POST['member_id']); $member->save($_POST['data']['member'], "update", $member_id); //update role $result = $adminer->save($vals, "update", $member_id); if (!$pdb->Execute("UPDATE {$tb_prefix}roleadminers SET adminrole_id='" . $_POST['data']['adminrole_id'] . "' WHERE adminer_id='" . $member_id . "'")) { $pdb->Execute("INSERT INTO {$tb_prefix}roleadminers (adminrole_id,adminer_id) VALUES ('" . $_POST['data']['adminrole_id'] . "','" . $member_id . "')"); } } else { //search member_id if (!empty($_POST['data']['username'])) { $sql = "SELECT id FROM {$tb_prefix}members WHERE username='******'data']['username'] . "'"; $member_id = $pdb->GetOne($sql); if ($member_id) {
$Jog->Recomendar($app, $idJogador, $app->request->getBody()); }); $app->put('/Jogador/New/', function () use($app) { $Jog = new Jogador(); $Jog->NovoJogador($app, $app->request->getBody()); }); $app->get('/Jogador/:idJogador/', function ($idJogador) use($app) { $Jog = new Jogador(); $Jog->CarregarDados($app, $idJogador); }); $app->put('/Jogadores/Pesquisar/', function () use($app) { $Jog = new Jogador(); $Jog->Pesquisar($app, $app->request->getBody()); }); $app->get('/Time/byJogador/:idJogador/', function ($idJogador) use($app) { $Time = new Times(); $Time->CarregarTimebyIdJogador($app, $idJogador); }); $app->get('/Feed/', function () use($app) { $Feed = new Feed(); $Feed->CarregarFeed($app); }); $app->put('/RegistrarFeed/', function () use($app) { $Feed = new Feed(); $Feed->RegistrarFeed($app, $app->request->getBody()); }); /* //defina a rota $app->get('/teste/', function () use ($app) { $data = array("data"=>array("H aaaaaello World- ")); $app->render ('default.php',$data,200);
$attachment_model = new Attachments(); $cache = new Caches(); $standardtype = new Standardtypes(); $conditions = array(); $fields = null; $tpl_file = "standard"; if (isset($_POST['save']) && !empty($_POST['data']['standard'])) { $vals = $_POST['data']['standard']; if (isset($_POST['id'])) { $id = intval($_POST['id']); } if (!empty($_POST['data']['publish_time'])) { $vals['publish_time'] = Times::dateConvert($_POST['data']['publish_time']); } if (!empty($_POST['data']['force_time'])) { $vals['force_time'] = Times::dateConvert($_POST['data']['force_time']); } $allowed_ext = array(".zip", ".rar", ".pdf", ".doc", ".xls", ".txt", ".ppt"); $attachment->allowed_file_ext = am($attachment->allowed_file_ext, $allowed_ext); $attachment->rename_file = "standard-" . md5($time_stamp); $attachment->description = trim($vals['title']); if (!empty($id)) { $attachment->rename_file = "standard-" . md5($id); } if (!empty($_FILES['attach']['name'])) { $attachment->upload_process(); $vals['attachment_id'] = $attachment->id; } if (!empty($id)) { $vals['modified'] = $time_stamp; $result = $standard->save($vals, "update", $id);
setvar("item", $res); } $tpl_file = "job_edit"; template($tpl_file); exit; } } if (!empty($_POST['job']) && $_POST['save']) { $vals = $_POST['job']; pb_submit_check('job'); $now_job_amount = $job->findCount(null, "created>" . $today_start . " AND member_id=" . $the_memberid); if (isset($_POST['id'])) { $id = $_POST['id']; } if (!empty($_POST['expire_time'])) { $vals['expire_time'] = Times::dateConvert($_POST['expire_time']); } $check_job_update = $g['job_check']; if ($check_job_update == "0") { $vals['status'] = 1; $message_info = 'msg_wait_success'; } else { $vals['status'] = 0; $message_info = 'msg_wait_check'; } $vals['industry_id'] = PbController::getMultiId($_POST['industry']['id']); $vals['area_id'] = PbController::getMultiId($_POST['area']['id']); if (!empty($id)) { $vals['modified'] = $time_stamp; $result = $job->save($vals, "update", $id, null, "member_id=" . $the_memberid); } else {
$attachment->if_thumb_large = false; $attachment->if_watermark = false; $attachment->insert_new = false; $attachment->rename_file = $vals['adzone_id'] . "-" . $aname; $attachment->upload_process(); $vals['source_url'] = URL . $attachment_dir . "/" . $attachment->file_full_url; $vals['source_type'] = $_FILES['attach']['type']; $vals['is_image'] = $attachment->is_image; $vals['width'] = !empty($vals['width']) ? $vals['width'] : $attachment->width; $vals['height'] = !empty($vals['height']) ? $vals['height'] : $attachment->height; } if (!empty($_POST['data']['end_date'])) { $vals['end_date'] = Times::dateConvert($_POST['data']['end_date']); } if (!empty($_POST['data']['start_date'])) { $vals['start_date'] = Times::dateConvert($_POST['data']['start_date']); } if (!empty($id)) { $vals['modified'] = $time_stamp; $result = $ads->save($vals, "update", $id); $url = "ad.php?do=edit&id=" . $id; } else { if (empty($vals['start_date'])) { $vals['start_date'] = $time_stamp; } $vals['created'] = $vals['modified'] = $time_stamp; $result = $ads->save($vals); } if (!$result) { flash(); }
<?php session_start(); ob_start(); require '../../../Controller/Registry.php'; require '../../../Controller/conn.php'; require '../ClasseTimes.php'; $Times = new Times(); $Times->CriarIntxId($_REQUEST['NomeDoTime']); $Times->CriarStrNomeTime($_REQUEST['NomeDoTime']); $Times->CriarStrEstado($_REQUEST['estado']); $Times->CriarStrCidade($_REQUEST['cidade']); $Times->CriarIntDivisao($_REQUEST['divisao']); $Times->updateCadastroTimes($Times);
} $tpl_file = "fair.edit"; template($tpl_file); exit; } } if (isset($_POST['save']) && !empty($_POST['data']['expo']['name'])) { $expo->setParams(); if (isset($_POST['id'])) { $id = intval($_POST['id']); } if (!empty($_POST['data']['begin_time'])) { $expo->params['data']['expo']['begin_time'] = Times::dateConvert($_POST['data']['begin_time']); } if (!empty($_POST['data']['end_time'])) { $expo->params['data']['expo']['end_time'] = Times::dateConvert($_POST['data']['end_time']); } $expo->params['data']['expo']['status'] = 1; $expo->params['data']['expo']['industry_id'] = PbController::getMultiId($_POST['industry']['id']); $expo->params['data']['expo']['area_id'] = PbController::getMultiId($_POST['area']['id']); if (!empty($id)) { if (!empty($_FILES['pic']['name'])) { $attachment->insert_new = false; $attachment->rename_file = "fair-" . $id; $attachment->upload_process(); $expo->params['data']['expo']['picture'] = $attachment->file_full_url; } $expo->params['data']['expo']['modified'] = $time_stamp; $result = $expo->save($expo->params['data']['expo'], "update", $id); } else { $expo->params['data']['expo']['created'] = $expo->params['data']['expo']['modified'] = $time_stamp;
$res = $announce->read("*", $id); $res['display_expiration'] = df($res['display_expiration']); setvar("item", $res); } $tpl_file = "announce.edit"; template($tpl_file); exit; } } if (isset($_POST['save']) && !empty($_POST['data']['announcement'])) { $vals = $_POST['data']['announcement']; if (isset($_POST['id'])) { $id = intval($_POST['id']); } if (!empty($_POST['data']['display_expiration'])) { $vals['display_expiration'] = Times::dateConvert($_POST['data']['display_expiration']); } if (!empty($id)) { $vals['modified'] = $time_stamp; $result = $announce->save($vals, "update", $id); } else { $vals['created'] = $vals['modified'] = $time_stamp; $result = $announce->save($vals); } if (!$result) { flash(); } } if (isset($_GET['q'])) { $conditions[] = "subject like '%" . $_GET['q'] . "%'"; }
<?php session_start(); ob_start(); require '../Controller/Registry.php'; require '../Controller/conn.php'; require '../Controller/preProcessor.php'; require '../Models/Times/ClasseTimes.php'; $Times = new Times(); $RodacadastroTimes = new RodaDados(); #$TotalTimes = $Times->ContaTotalTimes(); $time = $Times->PegarTimesIndex(); echo $time; sleep(1); /* $result = mysql_query($sql); $cont = mysql_affected_rows($conexao); // Verifica se a consulta retornou linhas if ($cont > 0){ // Atribui o código HTML para montar uma tabela $tabela = "<table border='1'> <thead> <tr> <th>NOME</th></tr></thead><tbody> <tr>"; $return = "$tabela"; // Captura os dados da consulta e inseri na tabela HTML <tr> <td class="nomeTime">João da Silva</td> <td>Brasileiro</td> <td>Meio-Campo</td> <td>27 anos</td> <td>XV de Piracicaba</td> <td class="icons">
if (empty($companyinfo['name'])) { $i18n = new L10n(); $space_name = $i18n->translateSpaceName($_POST['data']['company']['name']); $space_name = str_replace(' ', '', $space_name); $vals['cache_spacename'] = $space_name; $vals['first_letter'] = substr($space_name, 0, 1); $member->updateSpaceName(array("id" => $the_memberid), $space_name); if (isset($companyinfo['status']) && $companyinfo['status'] == 0) { $vals['name'] = strip_tags($_POST['data']['company']['name']); $vals['english_name'] = strip_tags($vals['english_name']); } } } $vals['employee_amount'] = $vals['employee_amount']; if (!empty($vals['found_date'])) { $vals['found_date'] = Times::dateConvert($vals['found_date']); } if (!empty($_POST['manage_type'])) { $managetype = implode(",", $vals['manage_type']); $vals['manage_type'] = $managetype; } $vals['property'] = $vals['property']; $vals['main_prod'] = strip_tags($vals['main_prod']); $vals['address'] = strip_tags($vals['address']); $vals['description'] = strip_tags(trim($vals['description'])); $vals['boss_name'] = $vals['boss_name']; $vals['reg_address'] = $vals['reg_address']; $vals['reg_fund'] = $vals['reg_fund']; $vals['bank_from'] = $vals['bank_from']; $vals['bank_account'] = $vals['bank_account']; $vals['main_brand'] = $vals['main_brand'];
<?php session_start(); ob_start(); require '../../../Controller/Registry.php'; require '../../../Controller/conn.php'; require '../../../Controller/preProcessor.php'; require '../ClasseTimes.php'; $Times = new Times(); $RodacadastroTimes = new RodaDados(); #$TotalTimes = $Times->ContaTotalTimes(); $time = $Times->PegarTimes(); echo $time; sleep(1); /* $result = mysql_query($sql); $cont = mysql_affected_rows($conexao); // Verifica se a consulta retornou linhas if ($cont > 0){ // Atribui o código HTML para montar uma tabela $tabela = "<table border='1'> <thead> <tr> <th>NOME</th></tr></thead><tbody> <tr>"; $return = "$tabela"; // Captura os dados da consulta e inseri na tabela HTML <tr> <td class="nomeTime">João da Silva</td> <td>Brasileiro</td> <td>Meio-Campo</td> <td>27 anos</td> <td>XV de Piracicaba</td> <td class="icons">
<?php session_start(); ob_start(); require '../../../Controller/Registry.php'; require '../../../Controller/conn.php'; require '../ClasseTimes.php'; $Times = new Times(); $idTime = $Times->PegarId(); $Times->CriarIntxId(++$idTime); $Times->CriardtDataDeCadastro(date('Y-m-d H:i:s')); $Times->CriarStrNomeTime($_REQUEST['NomeDoTime']); $Times->CriarStrEstado($_REQUEST['estado']); $Times->CriarStrCidade($_REQUEST['cidade']); $Times->CriarIntDivisao($_REQUEST['divisao']); $Times->CriarIntIdUsuario($_SESSION['idUsuario']); $Times->insereCadastroTimes($Times);
public function updateCadastroTimes(Times $Times) { $this->conn->beginTransaction(); try { $stmt = $this->conn->prepare('UPDATE tb_times SET idTime=:idTime, NomeTime=:NomeTime, Estado=:Estado, Cidade=:Cidade, divisao=:divisao WHERE idTime = :idTime'); $dados = array(':idTime' => $Times->PegarId(), ':NomeTime' => $Times->PegarStrNomeTime(), ':Estado' => $Times->PegarStrEstado(), ':Cidade' => $Times->PegarStrCidade(), ':Divisao' => $Times->PegarIntDivisao()); $stmt->execute($dados); $this->conn->commit(); } catch (Exception $e) { $this->conn->rollback(); } }