//check if user ID access key is missing and if the number of song titles is not passed the amount which was returned
    echo "Sorry, the API code was not properly implemented";
    //this is mostly for you. You should not see this message once your code is functioning properly.
} else {
    //finally, if everything check on we retrieve and print the data returned by lyricsfly database
    $found_checksum = GetTag($html, "cs", $song_number);
    //get song checksum
    $found_ID = GetTag($html, "id", $song_number);
    //get song ID
    $found_title = GetTag($html, "tt", $song_number);
    //get song title
    $found_artist = GetTag($html, "ar", $song_number);
    //get song artist
    $found_album = GetTag($html, "al", $song_number);
    //get song album
    $found_lyrics = GetTag($html, "tx", $song_number);
    //get song lyrics
    $found_lyrics = str_replace("[br]", "<br>", $found_lyrics);
    //replace all "[br]" with "<br>" for html page
    $found_lyrics = str_replace("lyricsfly.com", "<a href='http://lyricsfly.com'>lyricsfly.com</a>", $found_lyrics);
    //add html for lyricsfly.com link back
    echo "<b>Title: {$found_title}</b><br>";
    //print the title
    echo "<b>Artist: {$found_artist}</b><br>";
    //print artist name
    echo "<b>Album: {$found_album}</b><br><br>";
    //print album name
    echo "{$found_lyrics}";
    //print lyrics
    echo "<a href='http://lyricsfly.com/search/correction.php?" . $found_checksum . "&id=" . $found_ID . "'>Fix above lyrics here</a><br><br>";
    //create a link to correction form for users to be able to correct lyrics
Exemple #2
0
$de1 = $pubdict->GetDictEntryByName("Patient Name", $tPatientName);
printf("Found %s", $tPatientName);
// Indeed the attribute could not be found. Since DICOM 2003, Patient Name
// has become Patient's Name.
$tPatientsName = new Tag();
$de2 = $pubdict->GetDictEntryByName("Patient's Name", $tPatientsName);
printf("Found: %s", $tPatientsName);
// Let's try to read an arbitrary DICOM Attribute:
$tDoseGridScaling = new Tag();
$de3 = $pubdict->GetDictEntryByName("Dose Grid Scaling", $tDoseGridScaling);
printf("Found: %s", $tDoseGridScaling);
if ($ds->FindDataElement($tDoseGridScaling)) {
    $sf = new StringFilter();
    $sf->SetFile($file);
    printf("Attribute Value as String: %s", $sf->ToString($tDoseGridScaling));
    // Let's check the name again:
    $pss = $sf->ToStringPair($tDoseGridScaling);
    printf("Attribute Name Checked: %s", $pss->first);
    printf("Attribute Value (string): %s", $pss->second);
    $dgs = $ds->GetDataElement($tDoseGridScaling);
    // Let's assume for a moment we knew the tag number:
    $at = new Tag(0x3004, 0xe);
    assert($at . GetTag() == $tDoseGridScaling);
    $at->SetFromDataSet($ds);
    // For the sake of long term maintenance, we will not write
    // that this particular attribute is stored as a double. What if
    // a user made a mistake. It is much safer to rely on GDCM internal
    // mechanism to deduce the VR::DS type (represented as a ieee double)
    $v = $at->GetValue();
    printf("DoseGridScaling=%s", $v);
}
Exemple #3
0
 * @date : 22-March-2013 (2-1-1392) 
 * @time : 16:32 
 * @subpackage   index.php
 * @issue : index page link to all CM with bootstrap 
 */
// is user in manager page
define('__MP__', FALSE);
session_start();
ob_start();
require_once './tconstant.php';
require_once './inc/header.php';
define('PAGE_C', 24);
require './api/general.php';
require './api/relation.php';
require './tempp/topic.php';
$a = GetTag();
$a = GetRecord($ID);
$dt = new TDate();
$st = new TStatistic();
$st->Count();
$viss['visitcount'] = $st->VisitCount($dt->Today(), time());
$viss['visitorcount'] = $st->VisitorCount($dt->Today(), time());
$viss['y'] = $st->VisitCount($dt->Yesterday(), $dt->Today());
$viss['totoal'] = $st->VisitCount(0, time());
$viss['online'] = $st->OnlineCount();
//print_r($viss);die;
$smarty->assign('vss', $viss);
if (isset($_COOKIE['mid'])) {
    $_SESSION['mid'] = $_COOKIE['mid'];
}
if (isset($url[1]) && $url[0] == 'form' && isset($_POST)) {