Esempio n. 1
0
function getDisaster($id)
{
    global $data;
    $name = $data["data"][$id]["fields"]["name"];
    $d = new Disaster($data["data"][$id]["id"], explode(": ", $name)[0], @explode(" - ", @explode(": ", $name)[1])[0], explode(" - ", $name)[1], getDescription($data["data"][$id]["id"]), null, 0, 0);
    return $d;
}
function getBlogData($marketName)
{
    //create client
    $consumerKey = "Add your Key";
    $consumerSecret = "Add Secret key";
    $blogName = 'yr_username.tumblr.com';
    $client = new Tumblr\API\Client($consumerKey, $consumerSecret);
    $response = $client->getBlogPosts($blogName, array('tag' => $marketName));
    // get posts
    $posts = $response->posts;
    $blogs = $response->blog;
    global $dataId;
    $x = 0;
    foreach ($posts as $post) {
        if (isset($post->title)) {
            if (isset($post->body)) {
                $dataArray[] = array('imageSrc' => getImgSrc($post->body, "<img", "/>"), 'title' => $post->title, 'tags' => convertTagsIntoString(array_map('strval', $post->tags)), 'description' => trimblanklines(trimblankspaces(shortenedDescription(getDescription($post->body, "</p>", $dataId), 250))), 'postId' => $post->id);
            }
        }
        $x++;
    }
    return $dataArray;
}
Esempio n. 3
0
<?php

include "include.php";
$TITLE = " -> Challenges";
?>

<?php 
include "header.php";
?>

<?php 
$result = $FLICKR->collections_getTree(0, $FLICKR_USER);
$collections = $result['collections']['collection'];
// Find the challenges list
$challenges = null;
foreach ($collections as $collection) {
    if ($collection['title'] == 'CHALLENGES') {
        $challenges = $collection['collection'];
    }
}
// Show the challenges list
foreach ($challenges as $challenge) {
    $description = splitDescription($challenge['description']);
    echo "<div class=\"tableCell\">" . "<img class='tableImage' src='" . $challenge['iconsmall'] . "'>" . "<div class='tableText'><a href='challenge.php?chalid=" . $challenge['id'] . "'>" . $challenge['title'] . "</a><br/>" . getDescription($description) . "<br/>" . "</div></div>";
}
?>


<?php 
include "footer.php";
        ?>
      </td>
      <td valign="top" class="<?php 
        echo H($row_class);
        ?>
">
        <?php 
        echo H($fld->getSubfieldCd());
        ?>
      </td>
      <td valign="top" class="<?php 
        echo H($row_class);
        ?>
">
        <?php 
        echo H(getDescription($marcSubflds, $subfldIndex));
        ?>
      </td>
      <td valign="top" class="<?php 
        echo H($row_class);
        ?>
">
        <?php 
        echo H($fld->getFieldData());
        ?>
      </td>
    </tr>
      <?php 
        # swap row color
        if ($row_class == "primary") {
            $row_class = "alt1";
Esempio n. 5
0
<div id="pedido">
    <?php 
echo anchor(getProductUrlById($pedido['id_produto']), sprintf("<img src='%s' alt='%s' />", getThumbUrlById($pedido['id_produto']), $pedido['nome']), array('title' => $pedido['nome']));
?>
    
    
    <p>Nome: <?php 
echo $pedido['nome'];
?>
</p>
    <p>Preço: <?php 
echo $pedido['preco'];
?>
</p>
    <p>Descrição: <?php 
echo getDescription($pedido['id_produto']);
?>
</p>

        <?php 
echo form_open("pedido/editar", array('id' => 'form_obj'));
?>
    <fieldset>
        <legend>Editar dados do pedido</legend>

        <input type="hidden" name="id_pedido" value="<?php 
echo $pedido['id_pedido'];
?>
" />
            <ul>
                <li>Pedido em:
													<input type="text" id="expressedIn" name="expressedIn[]" value="<?php 
echo getElementValue("DataFormat", $DataFormatId, "expressedIn");
?>
" class="form-control" placeholder="Expressed In"  data-toggle="tooltip" data-placement="bottom" title="<?php 
echo getDescription("DataFormat", "expressedIn");
?>
">
												</div>
											</div>	
										</div>	
										<div class="col-md-5">												
											<div class="form-group">										
												<label class="col-sm-offset-1 col-xs-9 control-label">dct:description</label>
												<div class="col-sm-10">
													<textarea class="form-control" rows="8" id="dct_description" name="dct_description[]" placeholder="Description"  data-toggle="tooltip" data-placement="top" title="<?php 
echo getDescription("DataFormat", "dct_description");
?>
"><?php 
echo getElementValue("DataFormat", $DataFormatId, "dct_description");
?>
</textarea>
												</div>
											</div>	
										</div>			
									</div>
								</div>
							</div>
							<div id="tabs-2">
								<div class="box-content">
									<div class="form-group">
										<label class="col-sm-2 control-label">:usesVocabulary</label>
Esempio n. 7
0
    public function getCkBody($content = "", $team)
    {
        global $sourceFolder;
        global $cmsFolder;
        global $moduleFolder;
        global $urlRequestRoot;
        global $ICONS;
        require_once "{$sourceFolder}/{$moduleFolder}/article/ckeditor4.4/ckeditor.php";
        require_once "{$sourceFolder}/{$moduleFolder}/prhospi/prhospi_common.php";
        $editor = 'ckeditor';
        $amt = getAmount($team, $this->moduleComponentId);
        $amt1 = "";
        if ($team == "hospihead") {
            $amt1 .= getAmount($team . "1", $this->moduleComponentId);
        }
        $content = getDescription($team, $this->moduleComponentId);
        $CkForm = <<<Ck
      <form action="./+{$team}" method="post">
         <label>Enter the Amount:&nbsp;&nbsp;&nbsp;</label><input type="text" value="{$amt}" name="amountDetail"/>
         <input type="submit" value="Submit"><br/>
      </form>
Ck;
        if ($team == "hospihead") {
            $CkForm .= <<<CK

      <form action="./+{$team}" method="post">
         <label>Enter the Amount:&nbsp;&nbsp;&nbsp;</label><input type="text" value="{$amt1}" name="amountDetail1"/>
         <input type="submit" value="Submit"><br/>
      </form>
CK;
        }
        $CkForm .= <<<Ck

      <br/><br/>
      <form action="./+{$team}" method="post">
         <a name="editor"></a>
         <input type="button" id="show_plain" value="Plain Source" onclick="\$('#show_plain').hide();\$('#show_ckeditor').show();CKEDITOR.instances.CKEditor1.updateElement();CKEDITOR.instances.CKEditor1.destroy();document.getElementById('editor').value='plain';">
         <input type="button" id="show_ckeditor" value="CKEditor" style="display:none" onclick="\$('#show_plain').show();\$('#show_ckeditor').hide();CKEDITOR.add(CKEDITOR.editor.replace(document.getElementsByName('CKEditor1')[0]));document.getElementById('editor').value='ckeditor';">
         <input type="button" value="Cancel" onclick="submitarticleformCancel(this);"><input type="submit" value="Save"><input type="button" value="Preview" onclick="submitarticleformPreview(this)"><input type="button" value="Draft" onclick="submitarticleformDraft(this);">
         To upload files and images, go to the <a href="#files">files section</a>.<br/>

Ck;
        $top = "<a href='#topquicklinks'>Top</a>";
        $oCKEditor = new CKeditor();
        $oCKEditor->basePath = "{$urlRequestRoot}/{$cmsFolder}/{$moduleFolder}/article/ckeditor4.4/";
        $oCKEditor->config['width'] = '100%';
        $oCKEditor->config['height'] = '300';
        $oCKEditor->returnOutput = true;
        if ($editor == 'ckeditor') {
            $Ckbody = $oCKEditor->editor('CKEditor1', $content);
        } else {
            $Ckbody = $oCKEditor->editor('ne', "");
            //make a auxilary Ckeditor
            ///following destroys the the ckeditor instance as soon as it is initialized. Also hides the Plain Source button
            $Ckbody .= "<script>CKEDITOR.instances.ne.on('instanceReady',function(){ CKEDITOR.instances.ne.destroy()});\$('#show_plain').hide();\$('#show_ckeditor').show();</script>";
            $Ckbody .= '<textarea rows="20" cols="60" style="width:100%" name="CKEditor1" style="display: inline;">' . $content . '</textarea>';
        }
        $CkFooter = <<<Ck1
      <br/>
        <input type='hidden' name='editor' id='editor' value='{$editor}'/>
        <input type="button" value="Cancel" onclick="submitarticleformCancel(this);"><input type="submit" value="Save"><input type="button" value="Preview" onclick="submitarticleformPreview(this)"><input type="button" value="Draft" onclick="submitarticleformDraft(this);">
      </form>
      <script language="javascript">
         function submitarticleformPreview(butt) {
           butt.form.action = "./+{$team}&preview=yes#preview";
\t   butt.form.submit();
         }   
         function submitarticleformCancel(butt) {
\t   butt.form.action="./+view";
\t   butt.form.submit();
\t }
\t function submitarticleformDraft(butt) {
\t   butt.form.action="./+view&draft=yes";
\t   butt.form.submit();
\t }
    </script>\t\t\t\t\t\t\t
Ck1;
        return $CkForm . $Ckbody . $CkFooter;
        //.$draftTable.$top.$revisionTable.$top;
    }
Esempio n. 8
0
function execute_details()
{
    //en el modelo de los cursos puedo hacer un método para ver los detalles
    include_once "view/details.php";
    //guarda el id del course
    $course = $_GET['v1'];
    //echo $course;
    //guarda el usuario
    //$detail = getDescription($course);
    $data = array();
    //guardo en la variable data todos los enrolments del usuario indicado
    $data["Enrollment"] = getDescription($course);
    //guarda todos los enrollments del estudiante concreto
    view($data);
}
Esempio n. 9
0
                                     <?php 
                                }
                            } else {
                                echo $valdata[$valkol];
                            }
                        }
                        break;
                    case 'catatan':
                        if (strlen($valdata[$valkol]) > 15) {
                            echo substr($valdata[$valkol], 0, 16) . '. . .';
                        } else {
                            echo $valdata[$valkol];
                        }
                        break;
                    case 'kdbarang':
                        echo anchor(current_url() . '?id=' . $valdata[$valkol] . '&tbl=3', getDescription($valdata[$valkol]));
                        break;
                    default:
                        echo $valdata[$valkol];
                        break;
                }
                ?>
            </td>
        <?php 
            }
            ?>
    <?php 
        }
        ?>
</tr>
<?php 
Esempio n. 10
0
$currentEntry = null;
foreach ($entries as $entry) {
    if ($entry['id'] == $entryID) {
        $currentEntry = $entry;
    }
}
$description = splitDescription($currentEntry['description']);
$details = splitDetails($description);
$heading = splitEntryTitle($currentEntry['title']);
$TITLE = " -> <a href='index.php'>Challenge</a> -> <a href='challenge.php?chalid=" . $challengeID . "'>" . $challenge['title'] . "</a> -> " . $heading['title'];
include "header.php";
?>

<?php 
// Show comic details
echo "<div class=\"tableCell\">" . "<img class='tableImage' src='" . $details['THUMB'] . "'>" . "<div class='tableUser'>By: " . $heading['user'] . "</div>" . getDescription($description) . "<br/>" . "</div>";
// Show the comic slides
$set = $FLICKR->photosets_getPhotos($entryID, "url_o");
$slides = $set['photoset']['photo'];
echo "<div class='imageBlock'>";
$i = 0;
foreach ($slides as $slide) {
    echo "<img class='slideImage' src='" . $slide['url_o'] . "'>";
    //if ($i%1==0) echo "<br/>";
    $i++;
}
echo "</div></div>";
?>


<?php 
Esempio n. 11
0
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta content="telephone=no" name="format-detection">

<meta http-equiv="x-rim-auto-match" content="none">
<title><?php 
echo getTitle($archive, $category, $catid, $type);
?>
 - Powered by CmsEasy</title>
<meta name="keywords" content="<?php 
echo getKeywords($archive, $category, $catid, $type);
?>
" />
<meta name="description" content="<?php 
echo getDescription($archive, $category, $catid, $type);
?>
" />
<meta name="author" content="CmsEasy Team" />
<link href="<?php 
echo $skin_path;
?>
/wap.css" rel="stylesheet" /> 
</head>
<body>

<div id="header">
<div class="box">
<center><a href="<?php 
echo $base_url;
?>
 function getDescriptionForDisplay()
 {
     return use_current_protocol_in_html(getDescription());
 }
Esempio n. 13
0
{
    $alert = "<div class=\"notes\" style=\"margin:5px;\">";
    $alert .= " <convert>#label=486<convert>";
    $alert .= "</div>";
    $alert .= "<div class=\"new_content_license\">";
    $alert .= " <p><convert>#label=482<convert></p>";
    $alert .= " <p><convert>#label=483<convert></p>";
    $alert .= " <p><convert>#label=484<convert></p>";
    $alert .= " <p><convert>#label=509<convert> : " . getLicensePicture(1) . "</p>";
    $alert .= "</div>";
    return $alert;
}
//Get the values to display :
$locations = getLocation($category, $id);
$topographies = getTopography($category, $id);
$descriptions = getDescription($category, $id);
$riggings = getRigging($category, $id);
$histories = getHistory($category, $id);
$bibliographies = getBibliography($category, $id);
$comments = getComment($category, $id);
//Printing options setup :
$disabledOnlyAttribute = "disabled=\\\"disabled\\\" ";
$checkedAttribute = "checked=\\\"checked\\\" ";
$printLocations = $locations['Count'] > 0 ? "" : $disabledOnlyAttribute;
$printDescriptions = $descriptions['Count'] > 0 ? "" : $disabledOnlyAttribute;
$printRiggings = $riggings['Count'] > 0 ? "" : $disabledOnlyAttribute;
$printTopographies = $topographies['Count'] > 0 ? "" : $disabledOnlyAttribute;
$printHistories = $histories['Count'] > 0 ? "" : $disabledOnlyAttribute;
$printBibliographies = $bibliographies['Count'] > 0 ? "" : $disabledOnlyAttribute;
$printComments = $comments['Count'] > 0 ? "" : $disabledOnlyAttribute;
$defaultProperties = "";
Esempio n. 14
0
    }
    $q = "https://{$l}.wikipedia.org/w/api.php?action=query&prop=extracts&exchars={$chars}&titles={$pageLabel}&explaintext=true&format=json";
    $j = file_get_contents($q);
    $result = json_decode($j);
    if ($result !== NULL) {
        $pid = key($result->query->pages);
        $d = $result->query->pages->{"{$pid}"}->extract;
        $description = array('source' => "https://{$l}.wikipedia.org/wiki/{$pageLabel}", 'text' => $d);
        return $description;
    }
}
/*process*/
$wikidataId = getWikidataId($gnd);
$img = getWikidataImg($gnd, "100");
$wikiPageLabel = getWikiPage($wikidataId, $lang);
$wiki = getDescription($wikiPageLabel, $lang, 500);
$wikipage = $wiki["source"];
$description = $wiki["text"];
$r = array();
if (isset($img)) {
    $r['img'] = $img;
}
if (isset($wikidataId)) {
    $r['wikidataId'] = $wikidataId;
}
if (isset($wikipage)) {
    $r['wikipage'] = $wikipage;
}
if (isset($description)) {
    $r['description'] = $description;
}
Esempio n. 15
0
</h3>
<div>
<center>
<?php 
// And include the full-size image.
echo "<img src=\"img.php?img=" . $workid . "\" alt=\"[image]\" />\n";
?>
</center>
</div>
</div>

<div id="description">
<h3>Description</h3>
<p/>
<?php 
// Print out the work description if a user has provided one.
if (workHasDescription($workid)) {
    echo getDescription($workid);
} else {
    echo "This work doesn't have a description yet.";
}
?>
</div>

</div>

</div>
</div>
</body>
</html>
Esempio n. 16
0
      <th>আইডি</th>
      <th>বিবরণ</th>
      <th>এন্ট্রি</th>
      <th>পরিমাণ</th>      
      <th></th>
      <th>চেক বাকি</th>
    </tr>
    <?php 
$inventory = db("select * from inventory_check");
foreach ($inventory as $entry) {
    $pid = $entry["pid"];
    $checked = $entry["checked"];
    $stock = db("select * from inventory where pid = '{$pid}' limit 1");
    $invQty = @$stock["total_qty"];
    $unChecked = $invQty - $checked;
    $description = getDescription($pid);
    if ($unChecked != 0) {
        echo "<tr>\n                <td>{$pid}</td>\n                <td>{$description}</td>\n                <td>{$checked}</td>\n                <td>{$invQty}</td>\n                <td></td>\n                <td>{$unChecked}</td>\n              </tr>";
    }
    // echo "<tr>
    //         <td>$pid</td>
    //         <td>$description</td>
    //         <td>$checked</td>
    //         <td>$invQty</td>
    //         <td></td>
    //         <td>$unChecked</td>
    //       </tr>";
}
?>
  </table>
  <span id="last-space"></span>
Esempio n. 17
0
<div class='tableCell'>
<?php 
$description = splitDescription($currentChallenge['description']);
echo getDescription($description);
$details = splitDetails($description);
if (array_key_exists("START", $details)) {
    echo "<br/><br/><div class='smallText'><b>Start:</b> " . $details['START'] . "</div>";
}
if (array_key_exists("END", $details)) {
    echo "<div class='smallText'><b>End:</b> " . $details['END'] . "</div>";
}
if (array_key_exists("LOCATION", $details)) {
    $location = splitLocation($details['LOCATION']);
    echo "<div class='smallText'><b>Location:</b> <a href='http://maps.google.com/maps?q=" . $location["lat"] . "," . $location["lon"] . "'>Latitude: " . $location['lat'] . ", Longitude: " . $location['lon'] . ", Range: " . $location['range'] . "m</div>";
}
?>
</div>
<?php 
// Show the entries
foreach ($entries as $entry) {
    $description = splitDescription($entry['description']);
    $details = splitDetails($description);
    $heading = splitEntryTitle($entry['title']);
    echo "<div class=\"tableCell\">" . "<img class='tableImage' src='" . $details['THUMB'] . "'>" . "<div class='tableText'><a href='entry.php?chalid=" . $currentChallenge['id'] . "&entryid=" . $entry['id'] . "'>" . $heading['title'] . "</a><br/>" . "<div class='tableUser'>By: " . $heading['user'] . "</div>" . getDescription($description) . "<br/>" . "</div></div>";
}
?>


<?php 
include "footer.php";
Esempio n. 18
0
</legend>
    <ul>
    <?php 
foreach ($downloads as $product) {
    ?>
        <li>
            <?php 
    echo anchor('downloads/get/' . $product['id_produto'], sprintf("<img src='%s' alt='%s' />", getThumbUrlById($product['id_produto']), $product['image']), array('title' => $product['nome'], 'rel' => "prettyPhoto"));
    ?>
                                
            <p>Nome: <?php 
    echo $product['nome'];
    ?>
</p>
            <p>Descrição: <?php 
    echo getDescription($product['id_produto']);
    ?>
</p>
            <p><?php 
    echo anchor('downloads/get/' . $product['id_produto'], 'Download', array('title' => 'Efetuar download'));
    ?>
</p>
        </li>
    <?php 
}
?>
    </ul>
</fieldset>
<?php 
include "footer.php";
?>
Esempio n. 19
0
$colNumber = 0;
foreach ($column_headers as $val) {
    $worksheet->write($rowNumber, $colNumber++, trim($val));
}
$rowNumber = 1;
$colNumber = 0;
while ($row = $q->fetchRow()) {
    $categoryType = '';
    $colNumber = 0;
    $worksheet->write($rowNumber, $colNumber++, "feed_wooster");
    //ACCOUNT_ID
    $worksheet->write($rowNumber, $colNumber++, $row["dea_id"]);
    //AD_ID
    $worksheet->write($rowNumber, $colNumber++, $row["pro_address"]);
    //TITLE
    $worksheet->write($rowNumber, $colNumber++, getDescription($row));
    $worksheet->write($rowNumber, $colNumber++, round($row["dea_marketprice"]));
    //PRICE
    $worksheet->write($rowNumber, $colNumber++, $row["dea_type"] == 'Lettings' ? 'pw' : '');
    //PRICE_TYPE
    $worksheet->write($rowNumber, $colNumber++, getCategoryType($row));
    $worksheet->write($rowNumber, $colNumber++, $row["dea_bedroom"]);
    //PROPERTY_NUM_BEDROOMS
    $worksheet->write($rowNumber, $colNumber++, 'OFF');
    //OFFER_TYPE
    $worksheet->write($rowNumber, $colNumber++, $row["pro_postcode"]);
    //POSTCODE
    $worksheet->write($rowNumber, $colNumber++, $row["bra_email"]);
    //CONTACT_EMAIL
    $worksheet->write($rowNumber, $colNumber++, $row["bra_tel"]);
    //CONTACT_TEL
Esempio n. 20
0
    echo "<button format=\"" . $row['id'] . "-ts\"  class=\"challengeApprover\" formact=\"approve\">Yes</button>";
    echo "<button format=\"" . $row['id'] . "-ts\" class=\"challengeApprover\" formact=\"reject\"> No </button></td></tr></form>\n";
}
?>
	</table>

<h4>Descriptions</h4>
<table style="border:1px solid black;width:90%;">
<tr><td class="header">Collector</td><td class="header">Work</td><td class="header">Description</td><td style="min-width:130px;" class="header">Approve?</td></tr>
        <?php 
$stmt = $dbh->prepare("SELECT * FROM work_descriptions WHERE approved = 2");
$stmt->execute();
while ($row = $stmt->fetch()) {
    echo "<form id=\"" . $row['id'] . "-d\"><input type=\"hidden\" name=\"mode\" value=\"d\"/><input type=\"hidden\" name=\"tombstoneId\" value=\"" . $row['id'] . "\"/><input type=\"hidden\" name=\"player\" value=\"" . $row['uid'] . "\"/><input type=\"hidden\" name=\"work\" value=\"" . $row['work'] . "\"/>\n";
    echo "<tr><td style=\"vertical-align:top;\">" . getUsername($row['uid']) . "</td><td><img src=\"../img.php?img=" . $row['work'] . "\" style=\"width:75px;\"/></td>";
    echo "<td style=\"vertical-align:top;\">" . getDescription($row['work']) . "</td><td>";
    echo "<button format=\"" . $row['id'] . "-d\" class=\"challengeApprover\" formact=\"approve\">Yes</button>";
    echo "<button format=\"" . $row['id'] . "-d\" class=\"challengeApprover\" formact=\"reject\">No</button></td></tr></form>\n";
}
?>
        </table>

</div>

<div id="awards">
<h1>Awards</h1>
<h3>Promote or Demote a Player</h3>
Here, you may promote a player to Connoisseur status (or strip them of that status, as the case may be).  Enter a short message to appear
in the player's notification feed.
<?php 
$stmt = $dbh->prepare("SELECT * FROM collectors WHERE id > -1 ORDER BY name ASC");
Esempio n. 21
0
                echo json_encode($result);
            } else {
                echo json_encode('no url detected, either check your input or complain to maintainer');
            }
            break;
        case 'description':
            if ($url) {
                $result = getDescription($url);
                echo json_encode($result);
            } else {
                echo json_encode('no url detected, either check your input or complain to maintainer');
            }
            break;
        case 'ogdescription':
            if ($url) {
                $result = getDescription($url, 'og');
                echo json_encode($result);
            } else {
                echo json_encode('no url detected, either check your input or complain to maintainer');
            }
            break;
        case 'multi':
        default:
            echo json_encode("not title?");
            break;
    }
}
/* 
//For testing
else {
	echo getTitle( "http://php.net/manual/en/class.domnodelist.php" );
        </div>
        
        <div id="slide-content" class="scrollpane">
        
          <?php 
// grab array of library name ids (login names)
$name_id = getNameIDs();
// loop through these for the panel display
for ($i = 0; $i < count($name_id); $i++) {
    // smaller functions used for future flexibility
    $nameid = $name_id[$i];
    $id = getID($name_id[$i]);
    $url = getURL($name_id[$i]);
    $name = getName($name_id[$i]);
    $building = getBuilding($name_id[$i], 'at ');
    $description = getDescription($name_id[$i]);
    $notes = getHoursNotes($name_id[$i]);
    $map = getMapCode($name_id[$i]);
    $address = getAddress($name_id[$i]);
    $phone = getPhone($name_id[$i]);
    $accessurl = getAccessURL($name_id[$i]);
    $currentdate = date('Y-m-d');
    $currenttime = date('H:i:s');
    ?>
            
            <a name="view-<?php 
    echo $nameid;
    ?>
"></a>
            <div id="<?php 
    echo $nameid;
Esempio n. 23
0
 }
 // if the file is a directory and if directories are forbidden, skip it
 if (!$allowSubDirs and is_dir($entry)) {
     continue;
 }
 $f = array();
 $f["name"] = $entry;
 $f["isDownloadable"] = substr(strtolower($entry), -4) != ".php" || $allowPHPDownloads;
 $f["isDirectory"] = is_dir($entry);
 $fDate = @filemtime($entry);
 $f["date"] = $fDate;
 $f["fullDate"] = date("r", $fDate);
 $f["shortDate"] = date(translate("DATEFORMAT"), $fDate);
 //setlocale(LC_ALL,"German");
 //$f["shortDate"] = strftime("%x");
 $f["description"] = getDescription($entry);
 if ($f["isDirectory"]) {
     $f["type"] = "&lt;DIR&gt;";
     $f["size"] = "";
     $f["niceSize"] = "";
     // building the link
     if ($entry == "..") {
         // strip the last directory from the path
         $pathArr = explode("/", $path);
         $link = implode("/", array_slice($pathArr, 0, count($pathArr) - 2));
         // if there is no path set, don't add it to the link
         if ($link == "") {
             // we're already in $baseDir, so skip the file
             if ($path == "") {
                 continue;
             }
Esempio n. 24
0
        $tags = get_meta_tags($url);
    } catch (ErrorException $e) {
    }
    // At this version we only need description.
    if (isset($tags['description'])) {
        $description = $tags['description'];
    }
    return $description;
}
// Get title by URL.
function getTitle($url)
{
    $title = '';
    $str = '';
    try {
        $str = file_get_contents($url);
    } catch (ErrorException $e) {
        $title = $url;
    }
    if (strlen($str) > 0) {
        preg_match("/\\<title(.*)\\>(.*)\\<\\/title\\>/", $str, $titleArray);
        if (isset($titleArray[2])) {
            $title = $titleArray[2];
        }
    }
    return $title;
}
$title = getTitle($url);
$description = getDescription($url);
$meta = (object) array('title' => $title, 'description' => $description);
print json_encode($meta);
echo getElementValue("Dataset", $DatasetId, "dct_accessRights");
?>
" type="text" class="form-control" placeholder="Access Rights"  data-toggle="tooltip" data-placement="bottom" title="<?php 
echo getDescription("Dataset", "dct_accessRights");
?>
">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label">dct:rights</label>
										<div class="col-sm-4">
											<input id="dct:rights" name="dct_rights[]" type="text" value="<?php 
echo getElementValue("Dataset", $DatasetId, "dct_rights");
?>
" class="form-control" placeholder="Rights"  data-toggle="tooltip" data-placement="bottom" title="<?php 
echo getDescription("Dataset", "dct_rights");
?>
">
										</div>
									</div>									
								</div>
							</div>
							<div id="tabs-5">
								<div class="box-content">
									<div class="form-group">
										<label class="col-sm-4 control-label">dct:publisher</label>
										<div class="col-sm-4">
											<select name="dct_publisher[]" id="s2_with_tag_pub" multiple="multiple" class="populate placeholder" >
												<?php 
getFoafAgents("Dataset", $DatasetId, "dct_publisher");
?>
echo getElementValue("MetadataSchema", $metadataSchemaId, "dct_accessRights");
?>
" type="text" class="form-control" placeholder="Access Rights"  data-toggle="tooltip" data-placement="bottom" title="<?php 
echo getDescription("MetadataSchema", "dct_accessRights");
?>
">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label">dct:rights</label>
										<div class="col-sm-4">
											<input id="dct:rights" name="dct_rights[]" value="<?php 
echo getElementValue("MetadataSchema", $metadataSchemaId, "dct_rights");
?>
" type="text" class="form-control" placeholder="Rights"  data-toggle="tooltip" data-placement="bottom" title="<?php 
echo getDescription("MetadataSchema", "dct_rights");
?>
">
										</div>
									</div>									
								</div>
							</div>
							<div id="tabs-4">
								<div class="box-content">
									<div class="form-group">
										<label class="col-sm-4 control-label">:usedby</label>
										<div class="col-sm-6">
											<select name="usedby[]" id="usedby" multiple="multiple" class="populate placeholder" >
												<?php 
getFoafAgents("MetadataSchema", $metadataSchemaId, "usedby");
?>
Esempio n. 27
0
<?php 
if (workHasTombstone($workId)) {
    echo getTombstone($workId);
}
?>
</center>
<!-- Work ID is passed as a hidden field.  For the "mode" field, we must be updating the description if the work
 	already has one, so set the value accordingly. -->
<input type="hidden" name="work" value="<?php 
echo $workId;
?>
"/>
<input type="hidden" name="mode" value="<?php 
echo workHasDescription($workId) ? "update" : "new";
?>
"/>
<p/>
	<!-- textarea for the description.  Contains the existing description if there is one. -->
        <textarea id="desc" style="width:600;height:200;" name="desc"><?php 
if (workHasDescription($workId)) {
    echo getDescription($workId);
}
?>
	</textarea>
<p/>
<div style="float:right;clear:both;"><button id="submit">Update</button></div>
</div>
</form>
</body>
</html>