本文整理汇总了PHP中get_group函数的典型用法代码示例。如果您正苦于以下问题:PHP get_group函数的具体用法?PHP get_group怎么用?PHP get_group使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_group函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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'];
示例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];
示例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
示例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];
示例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"] = " ";
}
$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"] = " ";
$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";
//.........这里部分代码省略.........
示例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 />");
示例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("존재하지 않는 자료입니다.");