public function parse($data, $query) { $r = array(); $items = array('domain.name' => 'Domain:', 'domain.status' => 'Status:', 'domain.created' => 'Registered:', 'domain.expires' => 'Expires:', 'domain.dnssec' => 'Dnssec:', 'domain.nserver' => 'Nameservers', 'tech' => 'Administrator', 'owner' => 'Registrant', 'disclaimer.' => '#'); $r['regrinfo'] = get_blocks($data['rawdata'], $items); $contactFields = array('handle:' => 'handle', 'city:' => 'address.city', 'postalcode:' => 'address.pcode'); $r['regrinfo'] = get_contacts($r['regrinfo'], $contactFields); return $r; }
function parse($data_str, $query) { $items = array('owner' => 'Registrant:', 'domain.name' => 'Domain name:', 'domain.created' => 'Registered:', 'domain.changed' => 'Last modified:', 'domain.nserver' => 'DNS servers:', 'domain.status' => 'Status:', 'tech' => 'Technical contact:', 'admin' => 'Administrative contact:'); $r['regrinfo'] = get_blocks($data_str['rawdata'], $items); if (!empty($r['regrinfo']['domain']['name'])) { $r['regrinfo'] = get_contacts($r['regrinfo']); $r['regrinfo']['registered'] = 'yes'; } else { $r = ''; $r['regrinfo']['registered'] = 'no'; } $r['regyinfo'] = array('referrer' => 'http://www.isoc.am', 'registrar' => 'ISOCAM'); return $r; }
function parse($data, $query) { $items = array('domain.status' => 'Status:', 'domain.nserver' => 'Domain name servers in listed order:', 'domain.changed' => 'Record last updated on', 'owner' => 'rwhois search on', 'admin' => 'Administrative Contact:', 'tech' => 'Technical Contact:', 'billing' => 'Billing Contact:', '#' => 'Search Again'); $r['regrinfo'] = get_blocks($data['rawdata'], $items); if (isset($r['regrinfo']['domain']['status'])) { $r['regrinfo']['registered'] = 'yes'; $r['regrinfo']['domain']['handler'] = strtok(array_shift($r['regrinfo']['owner']), ' '); $r['regrinfo'] = get_contacts($r['regrinfo']); } else { $r['regrinfo']['registered'] = 'no'; } $r['regyinfo']['referrer'] = 'http://www.org.za'; $r['regyinfo']['registrar'] = 'The ORG.ZA Domain'; return $r; }
function parse($data_str, $query) { $items = array('owner' => 'Registrant:', 'admin' => 'Administrative Contact:', 'tech' => 'Technical Contact:', 'domain.name' => 'Domain Name:', 'domain.status' => 'Domain Status:', 'domain.created' => 'Created:', 'domain.changed' => 'Updated:', 'domain.expires' => 'Expired:', 'domain.nserver' => 'Domain servers in listed order:'); $extra = array('zip/postal code:' => 'address.pcode'); $r['regrinfo'] = get_blocks($data_str['rawdata'], $items); if (!empty($r['regrinfo']['domain']['name'])) { $r['regrinfo'] = get_contacts($r['regrinfo'], $extra); $r['regrinfo']['domain']['name'] = $r['regrinfo']['domain']['name'][0]; $r['regrinfo']['registered'] = 'yes'; } else { $r = ''; $r['regrinfo']['registered'] = 'no'; } $r['regyinfo'] = array('referrer' => 'http://www.nic.ly', 'registrar' => 'Libya ccTLD'); return $r; }
function parse($data_str, $query) { $items = array('owner' => 'Registrant:', 'domain.status' => 'Status:', 'domain.expires' => 'Expires:', 'domain.nserver' => 'Domain servers:'); $r['regrinfo'] = get_blocks($data_str['rawdata'], $items); if (!empty($r['regrinfo']['domain']['status'])) { $r['regrinfo'] = get_contacts($r['regrinfo']); date_default_timezone_set("Pacific/Fiji"); if (isset($r['regrinfo']['domain']['expires'])) { $r['regrinfo']['domain']['expires'] = strftime("%Y-%m-%d", strtotime($r['regrinfo']['domain']['expires'])); } $r['regrinfo']['registered'] = 'yes'; } else { $r['regrinfo']['registered'] = 'no'; } $r['regyinfo'] = array('referrer' => 'http://www.domains.fj', 'registrar' => 'FJ Domain Name Registry'); return $r; }
function parse($data, $query) { $items = array('domain.name' => 'Nome de domínio / Domain Name:', 'domain.created' => 'Data de registo / Creation Date (dd/mm/yyyy):', 'domain.nserver.' => 'Nameserver:', 'domain.status' => 'Estado / Status:', 'owner' => 'Titular / Registrant', 'billing' => 'Entidade Gestora / Billing Contact', 'admin' => 'Responsável Administrativo / Admin Contact', 'tech' => 'Responsável Técnico / Tech Contact', '#' => 'Nameserver Information'); $r['regrinfo'] = get_blocks($data['rawdata'], $items); if (empty($r['regrinfo']['domain']['name'])) { $r['regrinfo']['registered'] = 'no'; return $r; } $r['regrinfo']['domain']['created'] = get_date($r['regrinfo']['domain']['created'], 'dmy'); if ($r['regrinfo']['domain']['status'] == 'ACTIVE') { $r['regrinfo'] = get_contacts($r['regrinfo']); $r['regrinfo']['registered'] = 'yes'; } else { $r['regrinfo']['registered'] = 'no'; } $r['regyinfo'] = array('referrer' => 'http://www.fccn.pt', 'registrar' => 'FCCN'); return $r; }
function parse($data_str, $query) { $items = array('owner' => 'Titular:', 'domain.name' => 'Nombre de Dominio:', 'admin' => 'Contacto Administrativo', 'tech' => 'Contacto Tecnico', 'billing' => 'Contacto de Cobranza:', 'domain.created' => 'Fecha de Creacion:', 'domain.changed' => 'Ultima Actualizacion:', 'domain.expires' => 'Fecha de Vencimiento:', 'domain.status' => 'Estatus del dominio:', 'domain.nserver' => 'Servidor(es) de Nombres de Dominio'); $r['regrinfo'] = get_blocks($data_str['rawdata'], $items); $r['regyinfo'] = array('referrer' => 'http://registro.nic.ve', 'registrar' => 'NIC-Venezuela - CNTI'); if (!isset($r['regrinfo']['domain']['created']) || is_array($r['regrinfo']['domain']['created'])) { $r['regrinfo'] = array('registered' => 'no'); return $r; } $dns = array(); foreach ($r['regrinfo']['domain']['nserver'] as $nserv) { if ($nserv[0] == '-') { $dns[] = $nserv; } } $r['regrinfo']['domain']['nserver'] = $dns; $r['regrinfo'] = get_contacts($r['regrinfo']); return $r; }
function parse($data, $query) { $items = array('owner' => 'Registrant', 'admin' => 'Admin', 'tech' => 'Technical', 'billing' => 'Billing', 'domain.nserver' => 'Name Servers:', 'domain.created' => 'Created:', 'domain.expires' => 'Expires:', 'domain.changed' => 'Modified:', 'domain.status' => 'Status:', 'domain.sponsor' => 'Registrar Name:'); $r['regrinfo'] = get_blocks($data['rawdata'], $items); $items = array('phone number:' => 'phone', 'email address:' => 'email', 'fax number:' => 'fax', 'organisation:' => 'organization'); if (!empty($r['regrinfo']['domain']['created'])) { $r['regrinfo'] = get_contacts($r['regrinfo'], $items); if (count($r['regrinfo']['billing']['address']) > 4) { $r['regrinfo']['billing']['address'] = array_slice($r['regrinfo']['billing']['address'], 0, 4); } $r['regrinfo']['registered'] = 'yes'; format_dates($r['regrinfo']['domain'], 'dmY'); } else { $r = ''; $r['regrinfo']['registered'] = 'no'; } $r['regyinfo']['referrer'] = 'http://www.dot.dm'; $r['regyinfo']['registrar'] = 'dotFM'; return $r; }
function parse($data, $query) { $items = array('domain.name' => 'Domain:', 'domain.status' => 'Status:', 'domain.nserver' => 'Nameservers:', 'domain.created' => 'Registered:', 'owner' => 'Licensee:', 'admin' => 'Onsite Contacts:', 'tech' => 'Agent Technical Contacts:', 'agent' => 'Agent:'); $trans = array('company name2:' => ''); $r['regrinfo'] = get_blocks($data['rawdata'], $items); if ($r['regrinfo']['domain']['status'] == 'REGISTERED') { $r['regrinfo']['registered'] = 'yes'; $r['regrinfo'] = get_contacts($r['regrinfo'], $trans); if (isset($r['regrinfo']['agent'])) { $sponsor = get_contact($r['regrinfo']['agent'], $trans); unset($r['regrinfo']['agent']); $r['regrinfo']['domain']['sponsor'] = $sponsor['name']; } $r = format_dates($r, '-mdy'); } else { $r['regrinfo']['registered'] = 'no'; } $r['regyinfo']['referrer'] = 'http://www.domain-registry.nl'; $r['regyinfo']['registrar'] = 'DNS Belgium'; return $r; }
function parse($data_str, $query) { $items = array('owner' => 'Holder of domain name:', 'domain.name' => 'Domain name:', 'domain.created' => 'Date of last registration:', 'domain.changed' => 'Date of last modification:', 'tech' => 'Technical contact:', 'domain.nserver' => 'Name servers:'); $r['regrinfo'] = get_blocks($data_str['rawdata'], $items); if (!empty($r['regrinfo']['domain']['name'])) { $r['regrinfo'] = get_contacts($r['regrinfo']); $r['regrinfo']['domain']['name'] = $r['regrinfo']['domain']['name'][0]; if (isset($r['regrinfo']['domain']['changed'][0])) { $r['regrinfo']['domain']['changed'] = get_date($r['regrinfo']['domain']['changed'][0], 'dmy'); } if (isset($r['regrinfo']['domain']['created'][0])) { $r['regrinfo']['domain']['created'] = get_date($r['regrinfo']['domain']['created'][0], 'dmy'); } $r['regyinfo'] = array('referrer' => 'http://www.nic.ch', 'registrar' => 'SWITCH Domain Name Registration'); $r['regrinfo']['registered'] = 'yes'; } else { $r = ''; $r['regrinfo']['registered'] = 'no'; } return $r; }
} } echo "</td></tr>\n"; } echo "</table>\n"; } } else { echo '[<a href="' . $_SERVER['PHP_SELF'] . '?project_id=' . $_GET['project_id'] . '&show_orgs=1&show_contacts=' . $show_contacts . '" class="menu">Poka¿</a>]'; } echo "<br><br></td></tr>\n"; echo '<tr><td class="naglowek_maly">Kontakty:</td></tr>'; echo '<tr><td>'; if ($show_contacts == 1) { echo '[<a href="' . $_SERVER['PHP_SELF'] . '?project_id=' . $_GET['project_id'] . '&show_orgs=' . $show_orgs . '&show_contacts=0" class="menu">Ukryj</a>]</td></tr>'; echo '<tr><td>'; $contacts = get_contacts('project_id', $_GET['project_id']); if ($contacts === false) { echo 'B³±d bazy danych, spróbuj pó¼niej.'; } else { if (empty($contacts)) { echo '-'; } else { echo '<table>'; echo '<tr><th></th><th>Data, typ</th><th>Organizacja</th><th>Osoba kontaktuj±ca</th></tr>'; $num_contact = 1; foreach ($contacts as $cid) { echo '<tr><td>' . $num_contact . '. </td><td>'; ++$num_contact; display_link_to_contact($cid); $details = get_contact_details($cid); echo '</td><td>';
function display_contact_history() { $contacts = get_contacts('user_id', $_SESSION['valid_user_id']); if ($contacts === false) { echo 'B³±d bazy danych, spróbuj pó¼niej.'; } else { if (empty($contacts)) { echo 'Brak kontaktów.'; } else { echo '<table><tr><th></th><th>Data, typ</th><th>Organizacja</th><th>Projekt</th></tr>'; $num_contact = 1; foreach ($contacts as $cid) { echo '<tr><td>' . $num_contact . '. </td><td>'; ++$num_contact; display_link_to_contact($cid); $details = get_contact_details($cid); echo '</td><td>'; display_link_to_org($details['organisation_id']); echo '</td><td nowrap>'; display_link_to_project($details['project_id']); echo '</td></tr>'; } echo '</table>'; } } }
<?php require 'mymodel.php'; // On commence par inclure le modèle $db = dbconnect(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { //Insertion d'un nouveau contact suite au remplissage du formulaire insert_contact($_POST, $db); header("location: {$_SERVER['PHP_SELF']}"); exit; } else { //Sinon affichage des contacts en appelant les fonctions $nbre_contact = get_nbcontacts($db); $t_contacts = get_contacts($db); require 'myview.php'; // Affichage de la vue résultat } echo "Salut";
$contact_person = get_contact_person($_GET['org_id']); if ($contact_person !== false && !empty($contact_person)) { $content['Osoba kontaktowa'] = htmlspecialchars($contact_person); } foreach ($content as $label => $value) { echo '<tr><td width="50%" align="right"><b>' . $label . ':</b></td><td width="50%" align="left">'; echo $value; echo "</td></tr>\n"; } echo '<tr><td width="50%" align="right"><b>Osoba aktualizuj±ca dane:</b></td><td>'; display_link_to_user($org_info['updater_id']); echo "</td></tr>\n"; echo "</table></td></tr>\n"; } echo "</table>\n<br><br><br><br>"; $contacts = get_contacts('organisation_id', $_GET['org_id']); echo '<table width="90%">' . "\n"; echo '<tr><td align="center" class="naglowek">Historia kontaktów<hr></td></tr>' . "\n"; if ($contacts === false) { echo '<tr><td>B³±d bazy danych, spróbuj pó¼niej.'; } else { if (empty($contacts)) { echo '<tr><td>Brak kontaktów.</td></tr>' . "\n"; } else { echo '<tr><td align="center"><table>'; echo '<tr><th></th><th>Data, typ</th><th>Osoba kontaktuj±ca</th><th>Projekt</th></tr>'; $num_contact = 1; foreach ($contacts as $cid) { echo '<tr><td>' . $num_contact . '. </td><td>'; ++$num_contact; display_link_to_contact($cid);
} // if organisation data is not set, redirect to add_org_info_form.php if (empty_org($_GET['org_id'])) { header('location: add_org_info_form.php?org_id=' . $_GET['org_id'] . '&project_id=' . $_GET['project_id']); } // the $data array holds all the information about the contact $data['organisation_id'] = $_GET['org_id']; $data['project_id'] = $_GET['project_id']; $today = getdate(); // default date of contact is today $data['year'] = $today['year']; $data['month'] = $today['mon']; $data['day'] = $today['mday']; $data['type'] = $_GET['type']; // for easier use, last contact person is copied $org_contacts = get_contacts('organisation_id', $data['organisation_id']); $last_contact = get_contact_details($org_contacts[0]); $data['contact_person'] = $last_contact['contact_person']; $data['contact_function'] = $last_contact['contact_function']; // the default content of comments for meeting and phone call $data['comments'] = $_GET['type'] == 'spotkanie' ? "PRZEBIEG: \n\nATMOSFERA: \n\nREZULTAT: " : ''; $data['aim'] = $last_contact['aim']; $data['nc_type'] = 'spotkanie'; // next contact date (to days after today) $nc_date = getdate(strtotime('+2 days')); $data['nc_year'] = $nc_date['year']; $data['nc_month'] = $nc_date['mon']; $data['nc_day'] = $nc_date['mday']; } else { // "edit a contact" mode $edit = true;
function get_contacts_no_fields($binding, $filter) { return get_contacts($binding, $filter, null); }
<?php require_once '../include/common.inc.php'; echo "Starting...\n"; $binding = bronto_login("0bba03f2000000000000000000000000310d"); $contacts = get_contacts($binding); if ($contacts == null) { die("Unable to get contacts"); } foreach ($contacts as $contact) { echo $contact->id . "," . $contact->email . "\n"; }
<a target="_blank" href="#">VortrŠge online</a><br/> <span>Format:</span> <span>pdf</span> <span>Grš§e:</span> <span>43082 KB</span> </div> <div class="clear"></div> </div> <div class="clear"></div> </div> --> <div class="clear"></div> </div> <!-- @end main content --> <!-- Content Sidebar --> <div class="divContentSidebar"> <?php get_contacts(); ?> <?php if (has_categories()) { ?> <h3>Kategorie</h3> <ul> <?php get_categories('li', false); ?> </ul> <?php } ?>
function update_contacts_request($type_person, $id_of_person) { // This will be useful later, to check mandatory/optional contacts $all_contact_kwg = get_kwg_all('contact'); // // Update existing contacts // if (isset($_REQUEST['contact_value'])) { $contacts = $_REQUEST['contact_value']; $c_ids = $_REQUEST['contact_id']; $c_types = $_REQUEST['contact_type']; // // Check if the contacts provided are really attached to the person // or else the user can provide a form with false contacts. // $all_contacts = get_contacts($type_person, $id_of_person); for ($cpt = 0; isset($c_ids[$cpt]) && $c_ids[$cpt]; $cpt++) { $valid = false; foreach ($all_contacts as $c) { if ($c['id_contact'] == $c_ids[$cpt]) { $valid = true; } } if (!$valid) { lcm_panic("Invalid modification of existing contact detected."); } } for ($cpt = 0; isset($c_ids[$cpt]); $cpt++) { // Check first to see if the contact is mandatory $kwg = get_kwg_from_id($c_types[$cpt]); $delete_allowed = true; if ($kwg['policy'] == 'mandatory') { // XXX Having policy == 'mandatory' but quantity = many // really makes a mess, and is not handled. $delete_allowed = false; } if (_request('del_contact_' . $c_ids[$cpt])) { if ($delete_allowed) { lcm_debug("Contact DEL: {$type_person}, {$id_of_person}, " . $c_ids[$cpt], 1); delete_contact($c_ids[$cpt]); } else { $_SESSION['errors']['upd_contact_' . $cpt] = _T('warning_field_mandatory'); } } else { if (!$delete_allowed && !$contacts[$cpt]) { $_SESSION['errors']['upd_contact_' . $cpt] = _T('warning_field_mandatory'); } else { lcm_debug("Contact UPD: {$type_person}, {$id_of_person}, " . $c_ids[$cpt] . ' = ' . $contacts[$cpt], 1); $err = update_contact($c_ids[$cpt], $contacts[$cpt]); if ($err) { $_SESSION['errors']['upd_contact_' . $cpt] = $err; } } } } } // // New contacts // if (isset($_REQUEST['new_contact_value'])) { $cpt = 0; $new_contacts = $_REQUEST['new_contact_value']; $c_type_names = $_REQUEST['new_contact_type_name']; while (isset($new_contacts[$cpt])) { // Process only new contacts which have a value if ($new_contacts[$cpt]) { // And make sure that they have a "type of contact" if ($c_type_names[$cpt]) { lcm_debug("Contact NEW: {$type_person}, {$id_of_person}, Name = " . $c_type_names[$cpt] . ', ' . $new_contacts[$cpt], 1); $err = add_contact($type_person, $id_of_person, $c_type_names[$cpt], $new_contacts[$cpt]); if ($err) { $_SESSION['errors']['new_contact_' . $cpt] = $err; } } else { $_SESSION['errors']['new_contact_' . $cpt] = "Please specify the type of contact."; // TRAD } } $cpt++; } } // // Check if all mandatory contacts were provided // $all_contacts = get_contacts($type_person, $id_of_person); foreach ($all_contact_kwg as $c) { if ($c['policy'] == 'mandatory') { $found = false; foreach ($all_contacts as $a) { if ($a['name'] == $c['name'] && trim($a['value'])) { $found = true; } } if (!$found) { $_SESSION['errors']['contact_' . $c['name']] = _Ti($c['title']) . _T('warning_field_mandatory'); } } } }
function easy_parser($data_str, $items, $date_format, $translate = [], $has_org = false, $partial_match = false, $def_block = false) { $r = get_blocks($data_str, $items, $partial_match, $def_block); $r = get_contacts($r, $translate, $has_org); format_dates($r, $date_format); return $r; }
$rapidpro['auth_token'] = $tok; } if ($url = getenv('RAPIDPRO_URL')) { $rapidpro['url'] = $url; } if ($slug = getenv('RAPIDPRO_SLUG')) { $rapidpro['slug'] = $slug; } if ($group_name = getenv('RAPIDPRO_GROUP_NAME')) { $rapidpro['group_name'] = $group_name; } if ($rapidpro["group_name"]) { $group_uuid = get_group_uuid($rapidpro); $rapidpro["url"] = $rapidpro["url"] . "?group_uuids=" . $group_uuid; } if (!is_array($contacts = get_contacts($rapidpro))) { if (array_key_exists('HTTP_HOST', $_SERVER)) { header('HTTP/1.1 401 Unauthorized', true, 401); } die("Could not do it. Sorry."); } if (array_key_exists('HTTP_HOST', $_SERVER)) { header('HTTP/1.1 200 OK', true, 200); } echo '<?xml version="1.0" encoding="UTF-8"?> <CSD xmlns="urn:ihe:iti:csd:2013" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ihe:iti:csd:2013 CSD.xsd"> <organizationDirectory/> <serviceDirectory/> <facilityDirectory/> <providerDirectory> ';
array_push($to, $contacts[$position]); } // get random cc contacts $cc = array(); $num_cc = rand(0, 2); for ($x = 0; $x < $num_cc; $x++) { $position = rand(0, count($contacts) - 1); array_push($cc, $contacts[$position]); } array_push($messages, array('id' => uniqid(), 'from' => $from, 'to' => $to, 'cc' => $cc, 'subject' => $faker->realText(30), 'content' => $faker->paragraphs, 'unread' => true, 'date' => $faker->dateTimeBetween($startDate = '-1 weeks', $endDate = 'now')->format(DateTime::ISO8601))); } echo json_encode($messages); $app->response->setStatus(200); }); $app->get('/email/contacts', function () use($app) { $contacts = get_contacts(); if (null !== $contacts) { $app->response->setStatus(200); echo json_encode($contacts); } else { $app->response->setStatus(401); } }); $app->get('/elements/icons', function () use($app) { // get the users from json data $icons_data = file_get_contents(DATA_DIR . 'icons/icons.json'); $users = json_decode($icons_data, true); if (null !== $users) { $app->response->setStatus(200); echo json_encode($users); } else {
echo "<tr><td><table>\n"; echo "<tr><th></th><th>Organizacja</th><th>Projekt</th></tr>\n"; $num_org = 1; foreach ($user_orgs as $org) { echo '<tr><td>' . $num_org . '. </td><td>'; ++$num_org; display_link_to_org($org['organisation_id']); echo '</td><td nowrap>'; display_link_to_project($org['project_id']); echo "</td></tr>\n"; } echo "</table></td></tr>\n"; } } echo "</table>\n<br><br><br></td></tr>\n"; $contacts = get_contacts('user_id', $_GET['user_id']); echo '<tr><td><table>' . "\n"; echo '<tr><td class="naglowek_maly">Kontakty u¿ytkownika:</td></tr>' . "\n"; echo '<tr><td>'; if ($contacts === false) { echo 'B³±d bazy danych, spróbuj pó¼niej.'; } else { if (empty($contacts)) { echo 'Brak kontaktów.'; } else { echo '<table>'; echo '<tr><th></th><th>Data, typ</th><th>Organizacja</th><th>Projekt</th></tr>'; $num_contact = 1; foreach ($contacts as $cid) { echo '<tr><td>' . $num_contact . '. </td><td>'; ++$num_contact;