public function select($backUrl = 'entree')
 {
     // Defini content
     $this->dsp->template = 'layouts.templates.user';
     $this->dsp->content = $this->directory . '.select';
     // Param
     $this->dsp->addVar('param', ['titre' => gl('Ajouter une inscription'), 'backUrl' => $backUrl]);
     return View::make('dispatch')->with(['dsp' => $this->dsp]);
 }
Exemple #2
0
 /**
  * HomeController constructor.
  */
 public function __construct()
 {
     $this->dsp = new Dispatch();
     /* Directory*/
     $this->directory = 'home';
     /* Html Name */
     $this->dsp->htmlName = gl('Accueil');
     /* Content par default */
     $this->dsp->content = $this->directory . '.home';
 }
Exemple #3
0
 public function formule($backUrl, $compet_id = 0)
 {
     $this->dsp->template = 'layouts.templates.form';
     $this->dsp->content = $this->directory . '.formule';
     if ($compet_id == 0) {
         Redirect::route($backUrl);
     }
     // Param Create
     $this->dsp->addVar('param', ['titre' => gl('Dates et formules de jeu des tours'), 'backUrl' => $backUrl, 'compet_id' => $compet_id]);
     return View::make('dispatch')->with(['dsp' => $this->dsp]);
 }
 /**
  * @param string $backUrl
  * @param $id
  * @return \Illuminate\Http\RedirectResponse
  */
 public function changeTee($backUrl = 'compet', $id)
 {
     // Defini content
     $this->dsp->template = 'layouts.templates.user';
     $this->dsp->content = $this->directory . '.changetee';
     // Find
     $datas = Competcategorie::find($id);
     // Param delete
     $this->dsp->addVar('param', ['titre' => gl('Selection du tee'), 'backUrl' => $backUrl, 'datas' => $datas]);
     return View::make('dispatch')->with(['dsp' => $this->dsp]);
 }
Exemple #5
0
 public function isConfigDepart()
 {
     $code = '';
     if (count($this->configdeparts) == 0) {
         $code .= '<span class="glyphicon glyphicon-hand-right danger-txt" aria-hidden="true"></span>';
         $code .= ' ';
         $code .= '<span class="danger-txt">' . gl('A faire') . '</span>';
     } else {
         $code .= gl("Il y a ") . ' ' . count($this->configdeparts) . ' ' . gl("configuration(s)");
     }
     return $code;
 }
Exemple #6
0
 /**
  * @param $titres
  * @return string
  */
 public function thead($titres)
 {
     $code = "";
     $code .= "<thead>";
     $code .= "<tr>";
     foreach ($titres as $titre) {
         $code .= "<th class='" . $titre['class'] . "'>";
         $code .= gl($titre['label']);
         $code .= "</th>";
     }
     $code .= "</tr>";
     $code .= "</thead>";
     return $code;
 }
Exemple #7
0
 /**
  * @param array $params
  * @return string
  */
 public function subTitre($params = [])
 {
     // Check params
     $params['titre'] = isset($params['titre']) === true ? $params['titre'] : '';
     $params['class'] = isset($params['class']) === true ? $params['class'] : '';
     // Titre
     $titre = gl($params['titre']);
     // Class
     $class = $params['class'] . ' pull-left bloc-page-titre';
     // Code
     $code = "";
     $code .= "<div class='" . $class . "'>" . $titre . "</div>";
     // Return
     return $code;
 }
function usingRMM($keyword)
{
    $yuan = trim($keyword);
    $yuan = iconv('UTF-8', 'GB2312', $yuan);
    $tt = $yuan;
    $str = gl($tt);
    $sp = new SplitWord();
    $tt = $sp->SplitRMM($str);
    $cc = $tt;
    if (substr($cc, 0, 3) == "、") {
        $cc = substr($cc, 3);
    }
    if (substr($cc, -3, 3) == "、") {
        $cc = substr($cc, 0, -3);
    }
    $newstr = explode("、", $cc);
    if ($newstr[0] == "") {
        return false;
    }
    for ($i = 0; $i < count($newstr); $i++) {
        $newstr[$i] = iconv("gb2312", "UTF-8", $newstr[$i]);
    }
    return $newstr;
}
Exemple #9
0
 public function typeDescription($text = '', $up = false, $pluriel = false)
 {
     $reponse = $text;
     if ($this->typecompet->nbplayers > 1) {
         $reponse = str_replace('ce', 'cette', $reponse);
         $reponse = str_replace('un', 'une', $reponse);
         $reponse .= " ";
         $reponse .= $up ? 'Equipe' : 'équipe';
     } else {
         $reponse .= " ";
         $reponse .= $up ? 'Joueur' : 'joueur';
     }
     return $pluriel ? gl($reponse . 's') : gl($reponse);
 }
Exemple #10
0
 public function newListItem($param)
 {
     // Init line
     $line = "";
     // Col 1
     $line .= Xlist::colUnique(['data' => $this->iconeActif()]);
     // Ligne 1
     $line .= Xlist::openLigne();
     // OpenLink - Nom
     $line .= Xlist::openLink(['actions' => $param['actions'], 'backUrl' => $param['backUrl'], 'route' => $param['openRoute'], 'data' => $this->nom, 'id' => $this->id]);
     // Delete
     $line .= Xlist::butDelete(['actions' => $param['actions'], 'backUrl' => $param['backUrl'], 'route' => $param['deleteRoute'], 'id' => $this->id]);
     // Edit
     $line .= Xlist::butEdit(['actions' => $param['actions'], 'backUrl' => $param['backUrl'], 'route' => $param['editRoute'], 'id' => $this->id]);
     // Select
     $line .= Xlist::butSelect(['actions' => $param['actions'], 'backUrl' => $param['backUrl'], 'route' => $param['selectRoute'], 'id' => $this->id]);
     // A la ligne
     $line .= Xlist::ligneBreak();
     // Ligne 2
     $line .= Xlist::ligneAdd(['data' => $this->typedomaine->libelle]);
     $nbCompets = gl('Nombre de compétitions') . ' : ' . $this->compets->count();
     $line .= Xlist::ligneAdd(['data' => $nbCompets]);
     $line .= Xlist::closeLigne();
     return $line;
 }
Exemple #11
0
 /**
  * @return string
  */
 public function deleteDescription()
 {
     return gl('Supprimer cette inscription : ') . '<b>' . $this->player->nom . '</b>';
 }
Exemple #12
0
 $smarty->assign("video2", $array2);
 $i_sqlstr = "select * from tb_video_type ";
 $arraysi = $result->getRows($i_sqlstr, $conn);
 $smarty->assign("video_type", $arraysi);
 //获取更多相关视频
 require "splitword.php";
 //进行分词处理
 require "common/function.php";
 //过滤标点
 if (isset($_GET["video_name"])) {
     $keyword = urldecode($_GET['video_name']);
     //获取内容
 }
 $yuan = trim($keyword);
 $tt = $yuan;
 $str = gl($tt);
 $sp = new SplitWord();
 $sp->SplitRMM($str);
 $tt = $sp->SplitRMM($str);
 //$sp->Clear();
 $str = array(" ", "");
 //定义一个数组
 $cc = str_replace($str, "", $tt);
 //去掉字符串中的空格
 if (substr($cc, 0, 2) == "、") {
     $cc = substr($cc, 2);
     //去掉前面的“、”符号
 }
 if (substr($cc, -2, 2) == "、") {
     $cc = substr($cc, 0, -2);
     //去掉后面的“、”符号
Exemple #13
0
 /**
  * @return string
  */
 public function deleteDescription()
 {
     return gl('Supprimer ce club : ') . '<b>' . $this->nom . '</b>';
 }
Exemple #14
0
 /**
  * @param $id
  * @param $backUrl
  * @return \Illuminate\Http\RedirectResponse
  * @throws Exception
  */
 public function delete($backUrl = 'home', $id)
 {
     if (method_exists($this, 'beforeDelete')) {
         return $this->beforeDelete($id);
     }
     // Defini content
     $this->dsp->template = 'layouts.templates.user';
     $this->dsp->content = $this->dsp->delete;
     // Find
     $mod = $this->model;
     $datas = $mod::find($id);
     $delRoute = $this->prefix . '.dodelete';
     // Param delete
     $this->dsp->addVar('param', ['titre' => gl('Supression'), 'backUrl' => $backUrl, 'delRoute' => $delRoute, 'datas' => $datas]);
     return View::make('dispatch')->with(['dsp' => $this->dsp]);
 }
Exemple #15
0
 /**
  * @param $size
  * @param $param
  * @return string
  */
 public function bttDo($size = '', $param)
 {
     // Type
     if (!isset($param['type'])) {
         $type = 'button';
     } else {
         $type = $param['type'];
     }
     // Route
     if (!isset($param['route'])) {
         $route = 'home';
     } else {
         $route = $param['route'];
     }
     // Url
     $url = route($route);
     if (!empty($param['urlVars'])) {
         foreach ($param['urlVars'] as $prm) {
             $url .= '/' . $prm;
         }
     }
     // Icone
     if (!isset($param['icone'])) {
         $glyph = '';
     } else {
         $glyph = 'glyphicon glyphicon-' . $param['icone'];
     }
     // Color
     if (!isset($param['color'])) {
         $style = '';
     } else {
         $style = 'color: ' . $param['color'];
     }
     // Texte
     if (!isset($param['text'])) {
         $text = '';
     } else {
         $text = gl($param['text']);
     }
     // Name
     if (!isset($param['name'])) {
         $name = '';
     } else {
         $name = $param['name'];
     }
     // Id
     if (!isset($param['id'])) {
         $id = '';
     } else {
         $id = $param['id'];
     }
     // Value
     if (!isset($param['value'])) {
         $value = '';
     } else {
         $value = $param['value'];
     }
     // Class
     if (!isset($param['class'])) {
         $class = '';
     } else {
         $class = $param['class'];
     }
     // Code
     $code = '';
     // Link (button)
     if ($type == 'button') {
         $code .= '<a href="' . $url . '">';
     }
     // Button
     $code .= '<button type="' . $type . '" id="' . $id . '" name="' . $name . '" value="' . $value . '" class="btn btn-default btt ' . $size . ' ' . $class . '">';
     // Icone
     if ($glyph != '') {
         $code .= '<span class="' . $glyph . '" style="' . $style . '" aria-hidden="true"></span>';
     }
     // Texte
     if ($text != '') {
         $code .= ' ' . $text;
     }
     // Close Button
     $code .= '</button>';
     // Close Link
     if ($type == 'button') {
         $code .= '</a>';
     }
     return $code;
 }
Exemple #16
0
 /**
  * @param $zone
  * @return string
  */
 private function showLabelWithError($zone)
 {
     $label = gl($zone['label']);
     $star = errors_star($zone['field'], $this->errors);
     $classStar = '';
     if ($star == ' *') {
         $classStar = 'error';
     }
     return Form::label($zone['field'], $label . $star, ['class' => $classStar]);
 }
Exemple #17
0
        {{ Xbutton::bttAdd($param['addRoute'],[$param['backUrl']],$param['addText']) }}
    </div>
@endif

<?php 
// Init Message //
$isMessage = false;
$showMessage = '';
$maxData = isset($param['maxData']) ? $param['maxData'] : 0;
if ($maxData > 0 and $datas->count() > $maxData) {
    $isMessage = true;
    $showMessage = gl("Il y a trop d'élements trouvés");
}
if ($datas->count() == 0) {
    $isMessage = true;
    $showMessage = gl("Aucun éléments à afficher");
}
?>

<!-- Si Message -->

@if( $isMessage )

    {{ Xtable::open() }}

    <tr>
        <td>
            <div style="height: 10px;"></div>
        </td>
    </tr>
Exemple #18
0
<?php

$datas = $dsp->var['param']['datas'];
$param = $dsp->var['param'];
$typeCompetNbJoueurs = MySession::getModel('compet')->typecompet->nbplayers;
$nbJoueurLibelle = gl("Nombre de joueurs");
if ($typeCompetNbJoueurs > 1) {
    $nbJoueurLibelle = gl("Nombre d'équipes");
}
$nbJoueurDansFlight = gl("Nombre de joueurs dans un départ");
$nbJoueurDansFlightSelect = ['2' => 2, '3' => 3, '4' => 4];
if ($typeCompetNbJoueurs == 2) {
    $nbJoueurLibelle = gl("Nombre d'équipes dans un départ");
    $nbJoueurDansFlightSelect = ['2' => 2];
} elseif ($typeCompetNbJoueurs > 2) {
    $nbJoueurLibelle = gl("Nombre d'équipes dans un départ");
    $nbJoueurDansFlightSelect = ['1' => 1];
}
?>

{{ openContent($param['titre']) }}

<?php 
// Open Form
Xform::form('route', 'configdepart.create');
// Hidden
Xform::startRow('hidden');
Xform::addText('_token', 'x', Session::getToken(), 2);
Xform::addText('id', 'ID', $datas->id, 2);
Xform::addText('backUrl', '', $param['backUrl']);
Xform::addText('tour_id', 'TOUR_ID', MySession::getModel('tour')->id, 1);
Exemple #19
0
 public function newListItem($param)
 {
     $actions = $param['actions'];
     $backUrl = $param['backUrl'];
     // Si action select
     $selectRoute = strpos($actions, 'select') === false ? false : $param['selectRoute'];
     $line = "";
     // 1er Col - Unique
     $line .= '<td class="table-col-auto">';
     $line .= '<div class="divOnLeft">' . $this->categorie->sexe->icone() . '</div>';
     $line .= '</td>';
     $line .= '<td>';
     // Corps
     $line .= '<div>';
     // 1er ligne
     // Nom - Openable
     $line .= '<div class="divOnLeft dark-txt bold">';
     if (!(strpos($actions, 'open') === false)) {
         $line .= Xtable::link('competcategorie.create', $this->categorie->nom, [$backUrl, $this->id]);
     } else {
         $line .= $this->categorie->nom;
     }
     $line .= '</div>';
     // Delete
     if (!(strpos($actions, 'delete') === false)) {
         $line .= '<div class="pull-right">';
         $line .= Xbutton::bttDelete('competcategorie.delete', [$backUrl, $this->id]);
         $line .= '</div>';
     }
     // Edit
     if (!(strpos($actions, 'edit') === false)) {
         $line .= '<div class="pull-right">';
         $line .= Xbutton::bttEdit('competcategorie.changetee', [$backUrl, $this->id]);
         $line .= '</div>';
     }
     // Select
     if (!(strpos($actions, 'select') === false)) {
         $line .= '<div class="pull-right">';
         $line .= Xbutton::bttSelect('competcategorie.select', [$backUrl, $selectRoute, $this->id]);
         $line .= '</div>';
     }
     // Change ligne
     $line .= '<div></div>';
     // 2ème ligne
     $line .= '<div class="divOnLeft">' . $this->categorie->showHcp() . '</div>';
     $line .= '<div class="divOnLeft">' . $this->categorie->showAge() . '</div>';
     $line .= '<div class="divOnLeft">' . gl('Boites') . ' ' . $this->tee->icone() . '</div>';
     $line .= '</div>';
     $line .= '</td>';
     return $line;
 }
Exemple #20
0
 /**
  * @return string
  */
 public function deleteDescription()
 {
     return gl('Retirer cet élément de ma sélection : ') . '<b>' . $this->club->nom . '</b>';
 }
Exemple #21
0
 public function getInfos()
 {
     $code = '';
     $code .= gl('Du trou n°') . ' ';
     $code .= $this->starttee;
     $code .= gl(' à ') . ' ';
     $code .= showHeure($this->startheure);
     $code .= gl(' par ') . ' ';
     $code .= $this->interval;
     $code .= gl(' minutes ');
     $code .= gl(' sur ') . ' ';
     $code .= $this->parcour->nom;
     return $code;
 }
Exemple #22
0
 public function entreeListItem($param)
 {
     // Init line
     $line = "";
     // Col 1
     $line .= Xlist::colUnique(['data' => $this->nation->getFlag()]);
     // Ligne 1
     $line .= Xlist::openLigne();
     // OpenLink - Nom
     $line .= Xlist::openLink(['actions' => $param['actions'], 'backUrl' => $param['backUrl'], 'route' => $param['openRoute'], 'data' => $this->player->fullName(), 'id' => $this->id]);
     // Hcp
     $line .= Xlist::ligneAdd(['data' => $this->player->hcp]);
     // Delete
     $line .= Xlist::butDelete(['actions' => $param['actions'], 'backUrl' => $param['backUrl'], 'route' => $param['deleteRoute'], 'id' => $this->id]);
     // Edit
     $line .= Xlist::butEdit(['actions' => $param['actions'], 'backUrl' => $param['backUrl'], 'route' => $param['editRoute'], 'id' => $this->id]);
     // Select
     $line .= Xlist::butSelect(['actions' => $param['actions'], 'backUrl' => $param['backUrl'], 'route' => $param['selectRoute'], 'id' => $this->id]);
     // A la ligne
     $line .= Xlist::ligneBreak();
     // Ligne 2
     $line .= Xlist::ligneAdd(['data' => $this->player->sexe->icone()]);
     $line .= Xlist::ligneAdd(['data' => $this->player->age()]);
     $line .= Xlist::ligneAdd(['data' => $this->competcategorie->categorie->nom()]);
     $boite = gl('Boites') . ' ' . $this->competcategorie->tee->icone();
     $line .= Xlist::ligneAdd(['data' => $boite]);
     $line .= Xlist::closeLigne();
     return $line;
 }
Exemple #23
0
 public function newListItem($param)
 {
     // Init line
     $line = "";
     // Col 1
     $line .= Xlist::colUnique(['data' => $this->sexe->icone()]);
     // Ligne 1
     $line .= Xlist::openLigne();
     // OpenLink - Nom
     $line .= Xlist::openLink(['actions' => $param['actions'], 'backUrl' => $param['backUrl'], 'route' => $param['openRoute'], 'data' => $this->nom, 'id' => $this->id]);
     // Delete
     $line .= Xlist::butDelete(['actions' => $param['actions'], 'backUrl' => $param['backUrl'], 'route' => $param['deleteRoute'], 'id' => $this->id]);
     // Edit
     $line .= Xlist::butEdit(['actions' => $param['actions'], 'backUrl' => $param['backUrl'], 'route' => $param['editRoute'], 'id' => $this->id]);
     // Select
     $line .= Xlist::butSelect(['actions' => $param['actions'], 'backUrl' => $param['backUrl'], 'route' => $param['selectRoute'], 'id' => $this->id]);
     // A la ligne
     $line .= Xlist::ligneBreak();
     // Ligne 2
     $line .= Xlist::ligneAdd(['data' => $this->showHcp()]);
     $line .= Xlist::ligneAdd(['data' => $this->showAge()]);
     $boite = gl('Boites') . ' ' . $this->tee->icone();
     $line .= Xlist::ligneAdd(['data' => $boite]);
     $line .= Xlist::closeLigne();
     return $line;
 }
Exemple #24
0
 /**
  * @return string
  */
 public function deleteDescription()
 {
     return gl('Supprimer ce Manager : ') . '<b>' . $this->fullName() . '</b>';
 }