當前位置: 首頁>>代碼示例>>PHP>>正文


PHP People::tag_add方法代碼示例

本文整理匯總了PHP中People::tag_add方法的典型用法代碼示例。如果您正苦於以下問題:PHP People::tag_add方法的具體用法?PHP People::tag_add怎麽用?PHP People::tag_add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在People的用法示例。


在下文中一共展示了People::tag_add方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: COUNT

    }
    if (!is_null($adresse['building'])) {
        $building = Maps::buildingSearch($adresse['building'], $address['street']);
        if (count($building)) {
            $address['building'] = $building[0]['id'];
        } else {
            $building = Maps::buildingNew($adresse['building'], $address['street']);
            $address['building'] = $building;
        }
    } else {
        $address['building'] = null;
    }
    // On lance la création de l'adresse
    Maps::addressNew($person->get('id'), $address['ville'], $address['zip'], $address['street'], $address['building'], 'reel');
    $person->contact_details_add($contact['MAIL']);
    $person->tag_add('Sénateur PS');
    $person->tag_add($contact['REGION']);
    $query = $link->prepare('DELETE FROM `TABLE 30` WHERE `id` = :id');
    $query->bindValue(':id', $contact['id'], PDO::PARAM_INT);
    $query->execute();
}
$query = $link->query('SELECT COUNT(*) FROM `TABLE 30`');
$nb = $query->fetch(PDO::FETCH_NUM);
if ($nb[0]) {
    ?>
<script>
    var url = 'transfert.php';
    document.location.href = url;
</script>
<?php 
} else {
開發者ID:leqg,項目名稱:leqg,代碼行數:31,代碼來源:transfert.php

示例2: People

<?php

/**
 * Création d'un nouveau tag associé au contact
 *
 * PHP version 5
 *
 * @category Ajax
 * @package  LeQG
 * @author   Damien Senger <hi@hiwelo.co>
 * @license  https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License 3.0
 * @link     http://leqg.info
 */
$data = new People($_POST['contact']);
if (!empty($_POST['tag'])) {
    $data->tag_add($_POST['tag']);
}
開發者ID:leqg,項目名稱:leqg,代碼行數:17,代碼來源:contact-tag-nouveau.ajax.php

示例3: COUNT

    if (!empty($contact['Téléphone2domicile'])) {
        $person->contact_details_add($contact['Téléphone2domicile'], 'fixe');
    }
    if (!empty($contact['Télmobile'])) {
        $person->contact_details_add($contact['Télmobile'], 'mobile');
    }
    if (!empty($contact['Adressedemessagerie'])) {
        $person->contact_details_add($contact['Adressedemessagerie'], 'email');
    }
    if (!empty($contact['Adressedemessagerie2'])) {
        $person->contact_details_add($contact['Adressedemessagerie2'], 'email');
    }
    if (!empty($contact['Adressedemessagerie3'])) {
        $person->contact_details_add($contact['Adressedemessagerie3'], 'email');
    }
    $person->tag_add('contacts');
    $query = $link->prepare('DELETE FROM `TABLE 47` WHERE `id` = :id');
    $query->bindValue(':id', $contact['id'], PDO::PARAM_INT);
    $query->execute();
}
$query = $link->query('SELECT COUNT(*) FROM `TABLE 47`');
$nb = $query->fetch(PDO::FETCH_NUM);
if ($nb[0]) {
    ?>
<script>
    var url = 'importation.php';
    document.location.href = url;
</script>
<?php 
} else {
    echo 'Fini!';
開發者ID:leqg,項目名稱:leqg,代碼行數:31,代碼來源:importation.php

示例4: People

<?php

require_once 'includes.php';
$link = Configuration::read('db.link');
$person = People::create();
$person = new People($person);
$person->tag_add('newsletter');
$person->contact_details_add($_POST['email']);
header('Location: http://cordery.leqg.info/mail-info.php?email=' . md5($_POST['email']) . '&action=inscription');
開發者ID:leqg,項目名稱:leqg,代碼行數:9,代碼來源:mail-ajout.php


注:本文中的People::tag_add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。