• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_group函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_group函数的典型用法代码示例。如果您正苦于以下问题:PHP get_group函数的具体用法?PHP get_group怎么用?PHP get_group使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_group函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: get_group

function get_group($pid, $depth)
{
    $q = "\n\t\t\tselect\t\tA._profile_id\n\t\t\t,\t\t\tA.id\n\t\t\t,\t\t\tA.pid\n\t\t\t,\t\t\tA.name\n\t\t\t,\t\t\tA.name\t\tas text\n\t\t\tfrom\t\t_group\t\tA\n\t\t\twhere\t\tA._profile_id\t= ?\n\t\t\tand\t\t\tA.pid\t\t\t= ?\n\t\t\torder by\tA.id\n\t\t";
    $ps = Jaring::$_db->prepare($q);
    $ps->execute(array(Jaring::$_c_profile_id, $pid));
    $rs = $ps->fetchAll(PDO::FETCH_ASSOC);
    $ps->closeCursor();
    $index = 0;
    foreach ($rs as &$m) {
        $id = $m["id"];
        if ($index === 0) {
            $m["isFirst"] = true;
        } else {
            $m["isFirst"] = false;
        }
        $m["iconCls"] = "group";
        $m["index"] = $index++;
        $m["depth"] = $depth;
        $c = get_group($id, $depth + 1);
        if (count($c) <= 0) {
            $m["leaf"] = true;
        } else {
            $m["children"] = $c;
            $m["expandable"] = true;
            $m["expanded"] = true;
            $m["loaded"] = true;
        }
    }
    return $rs;
}
开发者ID:shuLhan,项目名称:sigma,代码行数:30,代码来源:read.php


示例2: get_group_as_array

 /**
  * @param string $postId Id del post donde se encuentrael grupo.
  * @param string $groupName nombre del grupo declarado en magic fields.
  * @param array $memberMappings un array que mapea cómo construir el objeto a partir de los campos declarados en el grupo de magic fields.
  *          Tal mapeo debe seguir ésta estructura:
  *			"key" : string Nombre que será usado en la llave del objeto creado de cada campo.
  *			"value" : string|closure Si es un string, el valor para ese campo será el primer elemento del array de campos cuyo nombre coincida con éste valor. Si ningún campo magic-fields tiene dicho nombre, un string vacío será asignado como value.
  *                  El value también puede ser una función anónima, usada para campos con estructuras más complejas, como "image_media".
  *                  Tal función anónima deberá aceptar un parametro llamado (preferentemente) $group al cuál le será pasado el grupo tal
  *                  cuál es devuelto por majic fields, y como tal contendrá todos los campos del grupo, de modo que puedas aplicar lógica más completa para
  *                  seleccionar el valor que se desea asignar a ese miembro del objeto. Ésta función anónima debe regresar el elemento a ser usado como value.
  *
  * Ejemplo
  *
  * Un código como éste:
  * <code>
  *      $data = get_group( 'info_instagram', $this->ID );
  *      $instagramTitulo = isset( $data['info_instagram_titulo'] ) ? $data['info_instagram_titulo'] : false;
  *      $instagramDescripcion = isset( $data['info_instagram_descripcion'] )	? $data['info_instagram_descripcion'] : false;
  *      $instagramFoto = isset( $data['info_instagram_foto'] )	? $data['info_instagram_foto'] : false;
  * </code>
  *
  * Puede ser convertido en éste más sencillo:
  * <code>
  *      $instagramData = Producto::magic_fields_get_group_as_single(
  *          $this->ID,
  *          'info_instagram',
  *          array(
  *              'titulo' => 'info_instagram_titulo',
  *              'descripcion' => 'info_instagram_descripcion',
  *              'foto' => function($elements){return isset($elements['info_instagram_foto']) ? reset($elements['info_instagram_foto'])['original'] : "";},
  *          )
  *      );
  * </code>
  *
  * @return array El array de objetos construidos en base a las reglas especificadas en $memberMappings. Si no se encontró ningún grupo, será devuelto un array vacío.
  */
 public static function get_group_as_array($postId, $groupName, $memberMappings)
 {
     /**
      * The array of groups as returned by magic fields.
      */
     $groups = get_group($groupName, $postId);
     if (!$groups) {
         return array();
     }
     /**
      * The formatted magic fields' group formatted by the rules of $memberMappings.
      */
     $formatedGroup = array();
     foreach ($groups as $group) {
         $members = array();
         foreach ($memberMappings as $memberName => $memberValue) {
             if (is_string($memberValue)) {
                 $members[$memberName] = isset($group[$memberValue]) ? reset($group[$memberValue]) : "";
             } else {
                 $members[$memberName] = $memberValue($group);
             }
         }
         $formatedGroup[] = $members;
     }
     return $formatedGroup;
 }
开发者ID:GafaMX,项目名称:dev_funciones_basicas,代码行数:63,代码来源:MagicFieldsUtil.php


示例3: __construct

 function __construct($id)
 {
     $info = get_group("info", $id);
     $info = reset($info);
     $this->nombre = get_the_title($id);
     $this->email = reset($info["info_email"]);
     $this->ciudad = reset($info["info_ciudad"]);
     $this->web = reset($info["info_pagina_web"]);
     $this->descripcion = reset($info["info_descripcion"]);
     $this->imagen = reset($info["info_foto"])["original"];
     $this->telefono = reset($info["info_telefono"]);
     $this->telefonoClean = preg_replace("/[^0-9]/", "", $this->telefono);
 }
开发者ID:GafaMX,项目名称:operaciondespierta.org,代码行数:13,代码来源:class-PersonaFisica.php


示例4: get_project

function get_project($project_code)
{
    global $g4;
    $sql = " select wr_id,wr_subject,wr_datetime,wr_1,wr_2,wr_3,wr_5 from g4_write_i01_project where wr_1 = '{$project_code}' ";
    //원본
    $result = sql_fetch($sql);
    $group = get_group($project_code);
    if ($group['gr_id']) {
        $result['group'] = $group;
    } else {
        $result['group'] = "그룹이존재하지않는다";
    }
    return $result;
}
开发者ID:moacom,项目名称:popay,代码行数:14,代码来源:project.extend.php


示例5: getPropertyValue

 /**  @inheritdoc */
 public function getPropertyValue(&$wpPost, &$wpPostMeta)
 {
     $rawGroups = get_group($this->magicFieldId, $wpPost->ID);
     $groups = array();
     foreach ($rawGroups as $rawGroupKey => $rawGroup) {
         $group = new \stdClass();
         foreach ($this->subFields as $subPropertyBuilder) {
             if (!$subPropertyBuilder instanceof MFMember) {
                 throw new \Exception("Only instances that inherit from 'MFMember' are allowed to build a 'MFGroup'.");
             }
             $group->{$subPropertyBuilder->getPropertyName()} = $subPropertyBuilder->getPropertyValueFromContext($rawGroup);
         }
         $groups[] = $group;
     }
     return $this->isDuplicableGroup ? $groups : reset($groups);
 }
开发者ID:wisquimas,项目名称:wordpress-template,代码行数:17,代码来源:class-mf-group-property-bulder.php


示例6: __construct

 function __construct($id)
 {
     $this->nombre = get_the_title($id);
     $info = get_group("info", $id);
     $info = reset($info);
     $this->emails = $info["info_emails"];
     $this->email = $this->emails ? reset($this->emails) : "";
     $this->direccion = reset($info["info_direccion"]);
     $this->ciudad = reset($info["info_ciudad"]);
     $this->web = reset($info["info_web"]);
     $this->descripcion = reset($info["info_descripcion"]);
     $this->imagen = reset($info["info_imagen"])["original"];
     $this->telefonos = $info["info_telefonos"];
     $this->telefono = $this->telefonos ? reset($this->telefonos) : "";
     $this->telefonoClean = preg_replace("/[^0-9]/", "", $this->telefono);
     $this->EsPersona = isset($info['info_persona_fisica']) ? reset($info['info_persona_fisica']) == 1 : false;
     $this->fundacionCategories = get_the_terms($id, Fundacion::CategoriaFundacionTaxName);
 }
开发者ID:GafaMX,项目名称:operaciondespierta.org,代码行数:18,代码来源:class-Fundacion.php


示例7: set_playlist

 private function set_playlist()
 {
     $grupo = get_group('playlists', $this->ID);
     if (!$grupo) {
         return;
     }
     $format_grupo = array();
     foreach ($grupo as $g) {
         if (!isset($g['playlists_spotify_uri']) || !isset($g['playlists_imagen']) || !isset($g['playlists_titulo'])) {
             continue;
         }
         if (empty($g['playlists_spotify_uri']) || empty($g['playlists_imagen']) || empty($g['playlists_titulo'])) {
             continue;
         }
         $format_grupo[] = array('uri' => reset($g['playlists_spotify_uri']), 'img' => reset($g['playlists_imagen']), 'title' => reset($g['playlists_titulo']));
     }
     return $format_grupo;
 }
开发者ID:GafaMX,项目名称:bunchofmakers.com,代码行数:18,代码来源:class-entrada.php


示例8: getPropertyValue

 /**  @inheritdoc */
 public function getPropertyValue(&$wpPost, &$wpPostMeta)
 {
     $group = get_group($this->magicFieldGroup, $wpPost->ID);
     if (!is_array($group)) {
         return null;
     }
     // El get group siempre devuelve un array. Mas esta clase, trata con grupos no duplicables.
     // El grupo es el que no es duplicable, mas sus fields son los que son duplicables.
     $group = reset($group);
     if (!isset($group[$this->magicFieldId])) {
         return null;
     }
     $results = $group[$this->magicFieldId];
     foreach ($results as $resultKey => $result) {
         $results[$resultKey] = $this->getProcessedValue($result);
     }
     // The MF core returns an object for arrays counting from 1. We find more useful to cast it into an array
     // starting with zero, so we use this function to force cast the MF fashion to an array fashion value.
     return array_values($results);
 }
开发者ID:wisquimas,项目名称:wordpress-template,代码行数:21,代码来源:class-mf-array-property-bulder.php


示例9: supporter_array_db

<?php

require_once '_header.php';
$s = supporter_array_db($_REQUEST['supporter_KEY']);
$g = get_group($_REQUEST['groups_KEY']);
?>
<h1>Call</h1>
<div class="row">
	<h3>Instructions</h3>
	<p><?php 
echo nl2br($g['Description']);
?>
</p>
	
</div>

<div class="row">
	<div class="span5">
		<h2>
			<?php 
echo $s['First_Name'];
?>
  <?php 
echo $s['Last_Name'];
?>
<br>
			<?php 
echo $s['Phone'];
?>
  <?php 
echo $s['Timezone'];
开发者ID:radicaldesigns,项目名称:jaguar,代码行数:31,代码来源:call.php


示例10: get_header

<?php

get_header();
?>
	
    <div class="content_wrapper clear">
		<section role="main" class="main">
        <?php 
//Get post thumbnail URL
$img = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'original');
// Set up Magic Fields
$sub_title = get_field('title');
$sub_content = get_field('sub_content');
$obsessions = get_group('obsessions');
$read = get_field('read');
$linkedin = get_field('linked_in_url');
$music = get_field('music');
$email = get_field('email');
$quote = get_field('quote');
$manifesto = get_field('manifesto');
//Extract First Name
$name = get_the_title();
$names = explode(' ', $name);
?>
        <?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
        	<img src="<?php 
        echo $img[0];
开发者ID:brettex,项目名称:pspark,代码行数:31,代码来源:single-staff.php


示例11: get_group

     $repertoire = 'eleves';
     $requete_trombi = "SELECT e.login, e.nom, e.prenom, e.elenoet, jec.login, jec.id_classe, jec.periode, c.classe, c.id, c.nom_complet\n\t\t\t\t\t\t\t\tFROM " . $prefix_base . "eleves e, " . $prefix_base . "j_eleves_classes jec, " . $prefix_base . "classes c\n\t\t\t\t\t\t\t\tWHERE e.login = jec.login\n\t\t\t\t\t\t\t\tAND jec.id_classe = c.id\n\t\t\t\t\t\t\t\tAND id = '" . $classe . "'\n\t\t\t\t\t\t\t\tAND (e.date_sortie is NULL OR e.date_sortie NOT LIKE '20%')\n\t\t\t\t\t\t\t\tGROUP BY nom, prenom";
 }
 if ($action_affiche === 'aid') {
     echo "AID : " . $donnees_qui['nom'];
     $repertoire = 'eleves';
     if (isset($_POST['order_by']) && $_POST['order_by'] == 'classe') {
         $grp_order_by = "c.classe, e.nom, e.prenom";
         $requete_trombi = "SELECT e.login , e.nom, e.prenom , e.elenoet , a.id , a.nom nom_complet\n\t\t\t\t\t\t\t\t\tFROM eleves e, aid a, j_aid_eleves j , j_eleves_classes jec , classes c\n\t\t\t\t\t\t\t\t\tWHERE j.login = e.login\n\t\t\t\t\t\t\t\t\tAND  e.login = jec.login\n\t\t\t\t\t\t\t\t\tAND jec.id_classe = c.id\n\t\t\t\t\t\t\t\t\tAND j.id_aid = a.id\n\t\t\t\t\t\t\t\t\tAND a.id = '" . $aid . "'\n\t\t\t\t\t\t\t\t\tAND (e.date_sortie is NULL OR e.date_sortie NOT LIKE '20%')\n\t\t\t\t\t\t\t\t\tGROUP BY e.login , e.nom , e.prenom\n\t\t\t\t\t\t\t\t\tORDER BY {$grp_order_by};";
     } else {
         $grp_order_by = "e.nom, e.prenom";
         $requete_trombi = "SELECT e.login, e.nom, e.prenom, e.elenoet, a.id, a.nom nom_complet\n\t\t\t\t\t\t\t\t\tFROM eleves e , aid a , j_aid_eleves j , classes c\n\t\t\t\t\t\t\t\t\tWHERE j.login = e.login\n\t\t\t\t\t\t\t\t\tAND j.id_aid = a.id\n\t\t\t\t\t\t\t\t\tAND a.id = '" . $aid . "'\n\t\t\t\t\t\t\t\t\tAND (e.date_sortie is NULL OR e.date_sortie NOT LIKE '20%')\n\t\t\t\t\t\t\t\t\tGROUP BY e.nom, e.prenom\n\t\t\t\t\t\t\t\t\tORDER BY {$grp_order_by};";
     }
 }
 if ($action_affiche === 'groupe') {
     $current_group = get_group($groupe);
     echo "Groupe : " . htmlspecialchars($donnees_qui['name']) . " (<em>" . $current_group['classlist_string'] . "</em>)";
     $repertoire = 'eleves';
     if (isset($_POST['order_by']) && $_POST['order_by'] == 'classe') {
         $grp_order_by = "c.classe, e.nom, e.prenom";
         $requete_trombi = "SELECT jeg.login, jeg.id_groupe, jeg.periode, e.login, e.nom, e.prenom, e.elenoet, g.id, g.name, g.description\n\t\t\t\t\t\t\t\t\tFROM " . $prefix_base . "eleves e, " . $prefix_base . "groupes g, " . $prefix_base . "j_eleves_groupes jeg, " . $prefix_base . "j_eleves_classes jec, " . $prefix_base . "classes c\n\t\t\t\t\t\t\t\t\tWHERE jeg.login = e.login\n\t\t\t\t\t\t\t\t\tAND jec.login = e.login\n\t\t\t\t\t\t\t\t\tAND jec.id_classe=c.id\n\t\t\t\t\t\t\t\t\tAND jeg.id_groupe = g.id\n\t\t\t\t\t\t\t\t\tAND g.id = '" . $groupe . "'\n\t\t\t\t\t\t\t\t\tAND (e.date_sortie is NULL OR e.date_sortie NOT LIKE '20%')\n\t\t\t\t\t\t\t\t\tGROUP BY nom, prenom\n\t\t\t\t\t\t\t\t\tORDER BY {$grp_order_by};";
     } else {
         $grp_order_by = "nom, prenom";
         $requete_trombi = "SELECT jeg.login, jeg.id_groupe, jeg.periode, e.login, e.nom, e.prenom, e.elenoet, g.id, g.name, g.description\n\t\t\t\t\t\t\t\t\tFROM " . $prefix_base . "eleves e, " . $prefix_base . "groupes g, " . $prefix_base . "j_eleves_groupes jeg\n\t\t\t\t\t\t\t\t\tWHERE jeg.login = e.login\n\t\t\t\t\t\t\t\t\tAND jeg.id_groupe = g.id\n\t\t\t\t\t\t\t\t\tAND g.id = '" . $groupe . "'\n\t\t\t\t\t\t\t\t\tAND (e.date_sortie is NULL OR e.date_sortie NOT LIKE '20%')\n\t\t\t\t\t\t\t\t\tGROUP BY nom, prenom\n\t\t\t\t\t\t\t\t\tORDER BY {$grp_order_by};";
     }
     //echo "$requete_trombi<br />";
 }
 if ($action_affiche === 'equipepeda') {
     echo "Equipe pédagogique : " . $donnees_qui['nom_complet'] . " (<em>" . $donnees_qui['classe'] . "</em>)";
     $repertoire = 'personnels';
     $requete_trombi = 'SELECT * FROM ' . $prefix_base . 'utilisateurs u, ' . $prefix_base . 'j_groupes_professeurs jgp, ' . $prefix_base . 'j_groupes_classes jgc, ' . $prefix_base . 'classes c
开发者ID:alhousseyni,项目名称:gepi,代码行数:31,代码来源:trombinoscopes.php


示例12: home_url

echo home_url();
?>
" class="right">
                            <img src="<?php 
bloginfo('template_directory');
?>
/img/white-logo.svg" alt="Primitive Spark" />
                        </a>
                        
                    </header>
                    <article class="clear">
					<?php 
//Get post thumbnail URL
$img = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'original');
// Set up Magic Fields
$questions = get_group('questions');
//Add in an ID to the array
foreach ($questions as $key => $question) {
    $questions[$key]['id'] = $key;
}
//Shuffle up that array!!
shuffle($questions);
//print_r($questions);
//Question A
echo "<ul class='left question question-a'>";
foreach ($questions as $key => $question) {
    $style = 'display:none';
    //$qid = getQuestionID($question['questions_question_a_title'][1]);
    //$pid = getQuestionID($question['questions_question_b_title'][1]);
    $id = $question['id'];
    $title = $question['questions_question_a_title'][1];
开发者ID:brettex,项目名称:pspark,代码行数:31,代码来源:would-you.php


示例13: dir_list_form

function dir_list_form()
{
    global $fm_current_root, $current_dir, $quota_mb, $resolveIDs, $order_dir_list_by, $islinux, $cmd_name, $ip, $path_info, $fm_color;
    $ti = getmicrotime();
    clearstatcache();
    $out = "<table border=0 cellspacing=1 cellpadding=4 width=\"100%\" bgcolor=\"#eeeeee\">\n";
    if ($opdir = @opendir($current_dir)) {
        $has_files = false;
        $entry_count = 0;
        $total_size = 0;
        $entry_list = array();
        while ($file = readdir($opdir)) {
            if ($file != "." && $file != "..") {
                $entry_list[$entry_count]["size"] = 0;
                $entry_list[$entry_count]["sizet"] = 0;
                $entry_list[$entry_count]["type"] = "none";
                if (is_file($current_dir . $file)) {
                    $ext = lowercase(strrchr($file, "."));
                    $entry_list[$entry_count]["type"] = "file";
                    // Função filetype() returns only "file"...
                    $entry_list[$entry_count]["size"] = filesize($current_dir . $file);
                    $entry_list[$entry_count]["sizet"] = format_size($entry_list[$entry_count]["size"]);
                    if (strstr($ext, ".")) {
                        $entry_list[$entry_count]["ext"] = $ext;
                        $entry_list[$entry_count]["extt"] = $ext;
                    } else {
                        $entry_list[$entry_count]["ext"] = "";
                        $entry_list[$entry_count]["extt"] = "&nbsp;";
                    }
                    $has_files = true;
                } elseif (is_dir($current_dir . $file)) {
                    // Recursive directory size disabled
                    // $entry_list[$entry_count]["size"] = total_size($current_dir.$file);
                    $entry_list[$entry_count]["size"] = 0;
                    $entry_list[$entry_count]["sizet"] = "&nbsp;";
                    $entry_list[$entry_count]["type"] = "dir";
                }
                $entry_list[$entry_count]["name"] = $file;
                $entry_list[$entry_count]["date"] = date("Ymd", filemtime($current_dir . $file));
                $entry_list[$entry_count]["time"] = date("his", filemtime($current_dir . $file));
                $entry_list[$entry_count]["datet"] = date("d/m/y h:i", filemtime($current_dir . $file));
                if ($islinux && $resolveIDs) {
                    $entry_list[$entry_count]["p"] = show_perms(fileperms($current_dir . $file));
                    $entry_list[$entry_count]["u"] = get_user(fileowner($current_dir . $file));
                    $entry_list[$entry_count]["g"] = get_group(filegroup($current_dir . $file));
                } else {
                    $entry_list[$entry_count]["p"] = base_convert(fileperms($current_dir . $file), 10, 8);
                    $entry_list[$entry_count]["p"] = substr($entry_list[$entry_count]["p"], strlen($entry_list[$entry_count]["p"]) - 3);
                    $entry_list[$entry_count]["u"] = fileowner($current_dir . $file);
                    $entry_list[$entry_count]["g"] = filegroup($current_dir . $file);
                }
                $total_size += $entry_list[$entry_count]["size"];
                $entry_count++;
            }
        }
        @closedir($opdir);
        if ($entry_count) {
            $or1 = "1A";
            $or2 = "2D";
            $or3 = "3A";
            $or4 = "4A";
            $or5 = "5A";
            $or6 = "6D";
            $or7 = "7D";
            switch ($order_dir_list_by) {
                case "1A":
                    $entry_list = array_csort($entry_list, "type", SORT_STRING, SORT_ASC, "name", SORT_STRING, SORT_ASC);
                    $or1 = "1D";
                    break;
                case "1D":
                    $entry_list = array_csort($entry_list, "type", SORT_STRING, SORT_ASC, "name", SORT_STRING, SORT_DESC);
                    $or1 = "1A";
                    break;
                case "2A":
                    $entry_list = array_csort($entry_list, "type", SORT_STRING, SORT_ASC, "p", SORT_STRING, SORT_ASC, "g", SORT_STRING, SORT_ASC, "u", SORT_STRING, SORT_ASC);
                    $or2 = "2D";
                    break;
                case "2D":
                    $entry_list = array_csort($entry_list, "type", SORT_STRING, SORT_ASC, "p", SORT_STRING, SORT_DESC, "g", SORT_STRING, SORT_ASC, "u", SORT_STRING, SORT_ASC);
                    $or2 = "2A";
                    break;
                case "3A":
                    $entry_list = array_csort($entry_list, "type", SORT_STRING, SORT_ASC, "u", SORT_STRING, SORT_ASC, "g", SORT_STRING, SORT_ASC);
                    $or3 = "3D";
                    break;
                case "3D":
                    $entry_list = array_csort($entry_list, "type", SORT_STRING, SORT_ASC, "u", SORT_STRING, SORT_DESC, "g", SORT_STRING, SORT_ASC);
                    $or3 = "3A";
                    break;
                case "4A":
                    $entry_list = array_csort($entry_list, "type", SORT_STRING, SORT_ASC, "g", SORT_STRING, SORT_ASC, "u", SORT_STRING, SORT_DESC);
                    $or4 = "4D";
                    break;
                case "4D":
                    $entry_list = array_csort($entry_list, "type", SORT_STRING, SORT_ASC, "g", SORT_STRING, SORT_DESC, "u", SORT_STRING, SORT_DESC);
                    $or4 = "4A";
                    break;
                case "5A":
                    $entry_list = array_csort($entry_list, "type", SORT_STRING, SORT_ASC, "size", SORT_NUMERIC, SORT_ASC);
                    $or5 = "5D";
//.........这里部分代码省略.........
开发者ID:Kavir91,项目名称:Convocatoria,代码行数:101,代码来源:index.php


示例14: affiche_debug

         affiche_debug("{$sql}<br />");
         $del = mysqli_query($GLOBALS["mysqli"], $sql);
     }
     // Suppression des anciennes notes de conteneurs
     $sql = "SELECT * FROM cn_conteneurs WHERE id_racine='" . $lig_ccn->id_cahier_notes . "';";
     affiche_debug("{$sql}<br />");
     $res_cn = mysqli_query($GLOBALS["mysqli"], $sql);
     if (mysqli_num_rows($res_cn) > 0) {
         while ($lig_cn = mysqli_fetch_object($res_cn)) {
             $sql = "DELETE FROM cn_notes_conteneurs WHERE login='{$login_eleve}' AND id_conteneur='" . $lig_cn->id . "';";
             affiche_debug("{$sql}<br />");
             $del = mysqli_query($GLOBALS["mysqli"], $sql);
         }
     }
 } else {
     $group_fut = get_group($id_grp_fut[$i]);
     echo "Transfert des notes/devoirs vers " . htmlspecialchars($group_fut['name']) . " (<i>" . htmlspecialchars($group_fut['matiere']['nom_complet']) . " en " . $group_fut["classlist_string"] . "</i>)" . "<br />";
     // Recherche du carnet de notes du nouveau groupe
     $sql = "SELECT * FROM cn_cahier_notes WHERE id_groupe='" . $id_grp_fut[$i] . "' AND periode='{$current_periode_num}'";
     $res_ccn_fut = mysqli_query($GLOBALS["mysqli"], $sql);
     if (mysqli_num_rows($res_ccn_fut) == 0) {
         // On crée le carnet de notes dans le groupe futur
         $nom_complet_matiere_fut = $group_fut["matiere"]["nom_complet"];
         $nom_court_matiere_fut = $group_fut["matiere"]["matiere"];
         $sql = "INSERT INTO cn_conteneurs SET id_racine='',\n\t\t\t\t\t\t\t\t\t\t\tnom_court='" . traitement_magic_quotes($group_fut["description"]) . "',\n\t\t\t\t\t\t\t\t\t\t\tnom_complet='" . traitement_magic_quotes($nom_complet_matiere_fut) . "',\n\t\t\t\t\t\t\t\t\t\t\tdescription = '',\n\t\t\t\t\t\t\t\t\t\t\tmode = '2',\n\t\t\t\t\t\t\t\t\t\t\tcoef = '1.0',\n\t\t\t\t\t\t\t\t\t\t\tarrondir = 's1',\n\t\t\t\t\t\t\t\t\t\t\tponderation = '0.0',\n\t\t\t\t\t\t\t\t\t\t\tdisplay_parents = '0',\n\t\t\t\t\t\t\t\t\t\t\tdisplay_bulletin = '1',\n\t\t\t\t\t\t\t\t\t\t\tparent = '0'";
         affiche_debug("{$sql}<br />");
         $reg = mysqli_query($GLOBALS["mysqli"], $sql);
         if ($reg) {
             $id_racine_fut = is_null($___mysqli_res = mysqli_insert_id($GLOBALS["mysqli"])) ? false : $___mysqli_res;
             $sql = "UPDATE cn_conteneurs SET id_racine='{$id_racine_fut}', parent = '0' WHERE id='{$id_racine_fut}';";
             affiche_debug("{$sql}<br />");
开发者ID:alhousseyni,项目名称:gepi,代码行数:31,代码来源:changement_eleve_classe.php


示例15: sql_query

<?php

$sub_menu = "300200";
include_once "./_common.php";
sql_query(" ALTER TABLE {$g4['group_member_table']} CHANGE `gm_id` `gm_id` INT( 11 ) DEFAULT '0' NOT NULL AUTO_INCREMENT ", false);
if ($w == "") {
    auth_check($auth[$sub_menu], "w");
    $mb = get_member($mb_id);
    if (!$mb[mb_id]) {
        alert("존재하지 않는 회원입니다.");
    }
    $gr = get_group($gr_id);
    if (!$gr[gr_id]) {
        alert("존재하지 않는 그룹입니다.");
    }
    $sql = " select count(*) as cnt\n               from {$g4['group_member_table']}\n              where gr_id = '{$gr_id}'\n                and mb_id = '{$mb_id}' ";
    $row = sql_fetch($sql);
    if ($row[cnt]) {
        alert("이미 등록되어 있는 자료입니다.");
    } else {
        check_token();
        $sql = " insert into {$g4['group_member_table']}\n                    set gr_id       = '{$_POST['gr_id']}',\n                        mb_id       = '{$_POST['mb_id']}',\n                        gm_datetime = '{$g4['time_ymdhis']}' ";
        sql_query($sql);
    }
} else {
    if ($w == 'd' || $w == 'listdelete') {
        auth_check($auth[$sub_menu], "d");
        $sql = " select * from {$g4['group_member_table']} where gm_id = '{$_POST['gm_id']}' ";
        $gm = sql_fetch($sql);
        if (!$gm[gm_id]) {
            alert("존재하지 않는 자료입니다.");
开发者ID:ragi79,项目名称:g4dtd,代码行数:31,代码来源:boardgroupmember_update.php


示例16: note

							$insert=mysqli_query($GLOBALS["mysqli"], $sql);
							if(!$insert) {
								$msg.="Erreur lors de l'insertion de la note ($lig_ele->note|$lig_ele->statut) pour $lig_ele->login_ele sur le devoir n°$id_devoir<br />";
								//echo "Erreur lors de l'insertion de la note ($lig_ele->note|$lig_ele->statut) pour $lig_ele->login_ele sur le devoir n°$id_devoir<br />";
							}
							else {
								$cpt_notes++;
							}
						}


						// Préparatifs de la mise à jour des moyennes de conteneurs
						$sql="SELECT id_groupe FROM cn_cahier_notes WHERE id_cahier_notes='$current_id_cn';";
						$res=mysqli_query($GLOBALS["mysqli"], $sql);
						$lig=mysqli_fetch_object($res);
						$current_group=get_group($lig->id_groupe);
						$periode_num=$current_periode;

						// Renseignement d'un témoin comme quoi le transfert a déjà été effectué pour le groupe
						$sql="UPDATE eb_groupes SET transfert='y' WHERE id_epreuve='$id_epreuve' AND id_groupe='$lig->id_groupe';";
						$update=mysqli_query($GLOBALS["mysqli"], $sql);

						// Mise à jour des moyennes de conteneurs
						recherche_enfant($id_racine);

					}

				}
			}
		
			if(($msg=='')&&($cpt_notes>0)) {
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:transfert_cn.php


示例17: alert

} else {
    if ($w == 'u') {
        $html_title .= ' 수정';
        if (!$board['bo_table']) {
            alert('존재하지 않은 게시판 입니다.');
        }
        if ($is_admin == 'group') {
            if ($member['mb_id'] != $group['gr_admin']) {
                alert('그룹이 틀립니다.');
            }
        }
        $readonly = 'readonly';
    }
}
if ($is_admin != 'super') {
    $group = get_group($board['gr_id']);
    $is_admin = is_admin($member['mb_id']);
}
$g5['title'] = $html_title;
include_once './admin.head.php';
$pg_anchor = '<ul class="anchor">
    <li><a href="#anc_bo_basic">기본 설정</a></li>
    <li><a href="#anc_bo_auth">권한 설정</a></li>
    <li><a href="#anc_bo_function">기능 설정</a></li>
    <li><a href="#anc_bo_design">디자인/양식</a></li>
    <li><a href="#anc_bo_point">포인트 설정</a></li>
    <li><a href="#anc_bo_extra">여분필드</a></li>
</ul>';
$frm_submit = '<div class="btn_confirm01 btn_confirm">
    <input type="submit" value="확인" class="btn_submit" accesskey="s">
    <a href="./board_list.php?' . $qstr . '">목록</a>' . PHP_EOL;
开发者ID:kimyongyeon,项目名称:myproject,代码行数:31,代码来源:board_form.php


示例18: array

//
// définition des colonnes matières
//
$i = '0';
//pour calculer la moyenne annee de chaque matiere
$moyenne_annee_matiere = array();
$prev_cat_id = null;
while ($i < $lignes_groupes) {
    $moy_max = -1;
    $moy_min = 21;
    //echo "<p>Debut d'un tour de boucle<br />\$i=$i et \$lignes_groupes=$lignes_groupes<br />";
    foreach ($moyenne_annee_matiere as $tableau => $value) {
        unset($moyenne_annee_matiere[$tableau]);
    }
    $var_group_id = old_mysql_result($groupeinfo, $i, "id_groupe");
    $current_group = get_group($var_group_id);
    // Coeff pour la classe
    $current_coef = old_mysql_result($groupeinfo, $i, "coef");
    //echo $current_group['name']."<br />";
    if (!isset($current_group['visibilite']['cahier_notes']) || $current_group['visibilite']['cahier_notes'] == 'y') {
        $nb_col++;
        $k++;
        //==============================
        // AJOUT: boireaus
        if ($referent == "une_periode") {
            $sql = "SELECT round(avg(cnc.note),1) moyenne FROM cn_cahier_notes ccn, cn_conteneurs cc, cn_notes_conteneurs cnc WHERE\n\t\t\tccn.id_groupe='" . $current_group["id"] . "' AND\n\t\t\tccn.periode='{$num_periode}' AND\n\t\t\tcc.id_racine = ccn.id_cahier_notes AND\n\t\t\tcnc.id_conteneur=cc.id AND\n\t\t\tcc.id=cc.id_racine AND\n\t\t\tcnc.statut='y'";
            $call_moyenne = mysqli_query($GLOBALS["mysqli"], $sql);
        } else {
            $sql = "SELECT round(avg(cnc.note),1) moyenne FROM cn_cahier_notes ccn, cn_conteneurs cc, cn_notes_conteneurs cnc WHERE\n\t\t\tccn.id_groupe='" . $current_group["id"] . "' AND\n\t\t\tcc.id_racine = ccn.id_cahier_notes AND\n\t\t\tcnc.id_conteneur=cc.id AND\n\t\t\tcc.id=cc.id_racine AND\n\t\t\tcnc.statut='y'";
            $call_moyenne = mysqli_query($GLOBALS["mysqli"], $sql);
        }
开发者ID:alhousseyni,项目名称:gepi,代码行数:31,代码来源:visu_toutes_notes2.php


示例19: get_group

    $details = get_group('Details', $post->ID);
    if ($details) {
        foreach ($details as $detail) {
            ?>
					<dt><?php 
            echo $detail['details_label'][1];
            ?>
</dt>
					<dd><?php 
            echo $detail['details_description'][1];
            ?>
</dd>
<?php 
        }
    }
    $classes = get_group('Classes Taken', $post->ID);
    if ($classes) {
        ?>
					<dt>Classes Taken</dt>
					<dd>
<?php 
        foreach ($classes as $class) {
            ?>
					<a href="<?php 
            echo get_page_link($class['classes_taken_class'][1]);
            ?>
"><?php 
            echo get_the_title($class['classes_taken_class'][1]);
            ?>
</a> 
<?php 
开发者ID:nchenx3sports,项目名称:wordpress,代码行数:31,代码来源:page-success-stories.php


示例20: while

 while (list($key, $value) = each($players)) {
     $val = $players[$key];
     if ($val['wins'] == "") {
         $val['wins'] = 0;
     }
     if ($val['draws'] == "") {
         $val['draws'] = 0;
     }
     if ($val['losses'] == "") {
         $val['losses'] = 0;
     }
     // Calculate Points: Wins = 2 Points, Draws = 1 Point, Losses = 0 Points
     $points = 0;
     $points = $points + $val['wins'] * 2 + $val['draws'];
     $list[$key] = $points;
     $h = get_group($key);
     $teams[$h[0]['group_id']] += $points;
 }
 // while
 arsort($teams);
 while (list($key, $value) = each($teams)) {
     if ($g = mysql_fetch_array(mysql_query("SELECT * FROM groups WHERE group_id = '{$key}'"))) {
         echo "<tr><td>" . $value . "</td>";
         echo '<td><a href="groups.php?action=view&id=' . $key . '">' . $g['title'] . '</a></td><td>';
         echo $g['ag'] == 1 ? 'Ja' : 'Nein';
         echo "</td></tr>";
     }
     // if
 }
 // while
 echo "</table>";
开发者ID:BackupTheBerlios,项目名称:freechess-svn,代码行数:31,代码来源:tournaments.php



注:本文中的get_group函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_group_array函数代码示例发布时间:2022-05-15
下一篇:
PHP get_gravatar函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap