function getIndicators($indicator) { global $applServer, $databasePath; $result = ""; switch ($indicator) { case "journalTotal": $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=list.xis&database=" . $databasePath . "title/title&count=1"; $XML = readData($serviceUrl, true); $result = getElementValue(getElementValue(str_replace("<hr>", "<hr />", $XML), "Isis_Total"), "occ"); break; case "articleTotal": $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=search.xis&database=" . $databasePath . "artigo/artigo&search=tp=o&count=1"; $XML = readData($serviceUrl, true); $result = getElementValue(getElementValue(str_replace("<hr>", "<hr />", $XML), "Isis_Total"), "occ"); break; case "issueTotal": $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=search.xis&database=" . $databasePath . "artigo/artigo&search=tp=i&count=1"; $XML = readData($serviceUrl, true); $result = getElementValue(getElementValue(str_replace("<hr>", "<hr />", $XML), "Isis_Total"), "occ"); break; case "citationTotal": $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=search.xis&database=" . $databasePath . "artigo/artigo&search=tp=c&count=1"; $XML = readData($serviceUrl, true); $result = getElementValue(getElementValue(str_replace("<hr>", "<hr />", $XML), "Isis_Total"), "occ"); break; } return $result; }
<label class="col-sm-2 control-label">dct:accessRights</label> <div class="col-sm-4"> <input id="dct:accessRights" name="dct_accessRights[]" value="<?php 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" >
/** * Get all titles contained at the issn array * @param $issn array */ public function getDetachedTitles($issn) { $this->getVariableFromDef(); if (is_array($issn)) { $issnTmp = ''; foreach ($issn as $key => $value) { if ($key > 0) { $issnTmp .= ' or '; } $issnTmp .= 'LOC=' . $value; } $issnString = $issnTmp; } else { $issnString = 'LOC=' . $issn; } $serviceUrl = "http://" . $this->applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=detached.xis&database=" . $this->databasePath . "title/title&gizmo=GIZMO_XML&search=" . $issnString; $XML = readData($serviceUrl, true); $journalTotal = getElementValue(getElementValue(str_replace("<hr>", "<hr />", $XML), "Isis_Total"), "occ"); $serviceXML .= '<collection name="' . $this->country . '" uri="http://' . $this->applServer . '">'; $serviceXML .= '<indicators>'; $serviceXML .= '<journalTotal>' . $journalTotal . '</journalTotal>'; $serviceXML .= '<articleTotal>' . getIndicators("articleTotal", $this->applServer, $this->databasePath, $issn) . '</articleTotal>'; $serviceXML .= '<issueTotal>' . getIndicators("issueTotal", $this->applServer, $this->databasePath, $issn) . '</issueTotal>'; $serviceXML .= '<citationTotal>' . getIndicators("citationTotal", $this->applServer, $this->databasePath, $issn) . '</citationTotal>'; $serviceXML .= '</indicators>'; $serviceXML .= $XML; $serviceXML .= '</collection>'; header("Content-type: text/xml charset=ISO-8859-1"); return $serviceXML; }
$service_requirements_status = $cfgenwpapi_obj->checkServiceRequirements($service_id); if ($service_requirements_status['status']) { include '../api/salesforce/SforceEnterpriseClient.php'; $mySforceConnection = new SforceEnterpriseClient(); try { $mySforceConnection->createConnection('../api/salesforce/enterprise.wsdl.xml'); $mySforceConnection->login($cfg[$service_id]['username'], $cfg[$service_id]['password'] . $cfg[$service_id]['accesstoken']); foreach ($cfg[$service_id]['lists'] as $list_v) { $list_id = $list_v['list_id']; $merge_vars = array(); // FIELDS $records = array(); $records[0] = new stdclass(); if (isset($list_v['fields']) && $list_v['fields']) { foreach ($list_v['fields'] as $field_v) { $records[0]->{$field_v['list_field_id']} = getElementValue($field_v['element_id']); } try { $sf_addcontact = true; if ($list_v['preventduplicates'] || $list_v['updateexistingcontact'] && !empty($list_v['filterduplicates'])) { $sf_contact_exists_where = ''; foreach ($list_v['filterduplicates'] as $filterduplicates_v) { $sf_contact_exists_where .= $filterduplicates_v . '=\'' . addcslashes($element_ids_values[$list_v['fields_by_id'][$filterduplicates_v]]['element_value'][0], "'") . '\' AND '; } $sf_contact_exists_where = substr($sf_contact_exists_where, 0, -4); $sf_contact_exists_req = 'SELECT Id from ' . $list_id . ' WHERE ' . $sf_contact_exists_where; $sf_contact_exists_res = $mySforceConnection->query($sf_contact_exists_req); if ($contactform_obj->cfg['debug']) { echo $sf_contact_exists_req . "\r\n"; echo 'Exist_res:' . "\r\n"; print_r($sf_contact_exists_res->records);
function getIndicators($indicator, $applServer, $databasePath, $issn) { $result = ""; switch ($indicator) { case "journalTotal": $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=list.xis&database=" . $databasePath . "title/title&count=1"; $XML = readData($serviceUrl, true); $result = getElementValue(getElementValue(str_replace("<hr>", "<hr />", $XML), "Isis_Total"), "occ"); break; case "articleTotal": if (isset($issn) && is_array($issn)) { /* selective harvesting */ $issnTmp = ''; foreach ($issn as $key => $value) { if ($key > 0) { $issnTmp .= ' or '; } $issnTmp .= 'HR=S' . $value . '$'; } $issn = $issnTmp; $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=search.xis&database=" . $databasePath . "artigo/artigo&search=" . $issn . "&count=1"; } else { /* full harvesting */ $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=search.xis&database=" . $databasePath . "artigo/artigo&search=tp=o&count=1"; } $XML = readData($serviceUrl, true); $result = getElementValue(getElementValue(str_replace("<hr>", "<hr />", $XML), "Isis_Total"), "occ"); break; case "issueTotal": if (isset($issn) && is_array($issn)) { /* selective harvesting */ $issnTmp = ''; foreach ($issn as $key => $value) { if ($key > 0) { $issnTmp .= ' or '; } $issnTmp .= 'seq=' . $value . '$'; } $issn = $issnTmp; $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=search.xis&database=" . $databasePath . "issue/issue&search=" . $issn . "&count=1"; } else { /* full harvesting */ $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=search.xis&database=" . $databasePath . "artigo/artigo&search=tp=i&count=1"; } $XML = readData($serviceUrl, true); $result = getElementValue(getElementValue(str_replace("<hr>", "<hr />", $XML), "Isis_Total"), "occ"); break; case "citationTotal": if (isset($issn) && is_array($issn)) { /* selective harvesting */ $issnTmp = ''; foreach ($issn as $key => $value) { if ($key > 0) { $issnTmp .= ' or '; } $issnTmp .= 'R=S' . $value . '$'; } $issn = $issnTmp; $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=search.xis&database=" . $databasePath . "artigo/artigo&search=" . $issn . "&count=1"; } else { /* full harvesting */ $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=search.xis&database=" . $databasePath . "artigo/artigo&search=tp=c&count=1"; } $XML = readData($serviceUrl, true); $result = getElementValue(getElementValue(str_replace("<hr>", "<hr />", $XML), "Isis_Total"), "occ"); break; case "journalArticleTotal": $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=search.xis&database=" . $databasePath . "artigo/artigo&search=HR=S" . $issn . "\$&count=1"; $XML = readData($serviceUrl, true); $result = getElementValue(getElementValue(str_replace("<hr>", "<hr />", $XML), "Isis_Total"), "occ"); break; case "journalIssueTotal": $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=search.xis&database=" . $databasePath . "issue/issue&search=Y" . $issn . "\$&count=1"; $XML = readData($serviceUrl, true); $result = getElementValue(getElementValue(str_replace("<hr>", "<hr />", $XML), "Isis_Total"), "occ"); break; case "journalCitationTotal": $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=search.xis&database=" . $databasePath . "artigo/artigo&search=R=S" . $issn . "\$&count=1"; $XML = readData($serviceUrl, true); $result = getElementValue(getElementValue(str_replace("<hr>", "<hr />", $XML), "Isis_Total"), "occ"); break; } return $result; }
" 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> <div class="col-sm-6"> <select name="usesVocabulary[]" id="usesVocabulary" multiple="multiple" class="populate placeholder"> <?php
<label class="col-sm-2 control-label">dct:accessRights</label> <div class="col-sm-4"> <input id="dct:accessRights" name="dct_accessRights[]" value="<?php 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" >
<tr> <th>#</th> <th>Title</th> <th>Rights</th> <th>Subject</th> </tr> </thead> <tbody> <?php $i = 1; $sql_query = "SELECT * FROM Dataset"; $results = mysql_query($sql_query, $db); while ($result = mysql_fetch_array($results)) { $ds_name = $result['name']; $ds_id = $result['id']; echo "<tr>" . "<td>" . $i . "</td>" . "<td><a href='index.php?op=edit-dataset&id=" . $ds_id . "' target='_blank'>" . $ds_name . "</a></td>" . "<td>" . getElementValue("Dataset", $ds_id, "dct_rights") . "</td>" . "<td>" . getElementValue("Dataset", $ds_id, "dct_subject") . "</td>" . "</tr>"; $i++; } ?> </tbody> <tfoot> <tr> <th>#</th> <th>Title</th> <th>Rights</th> <th>Subject</th> </tr> </tfoot> </table> </div> </div>
<th>#</th> <th>Title</th> <th>Rights</th> <th>Subject</th> <th>Homepage</th> </tr> </thead> <tbody> <?php $i = 1; $sql_query = "SELECT * FROM MetadataSchema"; $results = mysql_query($sql_query, $db); while ($result = mysql_fetch_array($results)) { $ms_name = $result['name']; $ms_id = $result['id']; echo "<tr>" . "<td>" . $i . "</td>" . "<td><a href='index.php?op=edit-metadataSchema&id=" . $ms_id . "' target='_blank'>" . $ms_name . "</a></td>" . "<td>" . getElementValue("MetadataSchema", $ms_id, "dct_rights") . "</td>" . "<td>" . getElementValue("MetadataSchema", $ms_id, "dct_subject") . "</td>" . "<td><a href='" . getElementValue("MetadataSchema", $ms_id, "foaf_homepage") . "' target='_blank'>" . getElementValue("MetadataSchema", $ms_id, "foaf_homepage") . "</a></td>" . "</tr>"; $i++; } ?> </tbody> <tfoot> <tr> <th>#</th> <th>Title</th> <th>Rights</th> <th>Subject</th> <th>Homepage</th> </tr> </tfoot> </table>
function displayButton($text, $ele, $value, $entry = "new", $append = "replace", $buttonOrLink = "button", $formframe = "") { //echo "text: $text, ele: $ele, value: $value, entry: $entry, append: $append, buttonOrLink: $buttonOrLink, formframe: $formframe<br>"; // 1. check for button or link // 2. write out the element $element = _formulize_returnElement($ele, $formframe); if (!is_object($element)) { print "invalid_element"; } if ($prevValueThisElement = getElementValue($entry, $element->getVar('ele_id'), $element->getVar('id_form'))) { $prevValue = 1; } else { $prevValue = 0; } if ($buttonOrLink == "button") { $curtime = time(); print "<input type=button name=displayButton_{$curtime} id=displayButton_{$curtime} value=\"{$text}\" onclick=\"javascript:displayButtonProcess('{$formframe}', '{$ele}', '{$entry}', '{$value}', '{$append}', '{$prevValue}');return false;\">\n"; } elseif ($buttonOrLink == "link") { print "<a href=\"\" onclick=\"javascript:displayButtonProcess('{$formframe}', '{$ele}', '{$entry}', '{$value}', '{$append}', '{$prevValue}');return false;\">{$text}</a>\n"; } else { exit("Error: invalid button or link option specified in a call to displayButton"); } }
<th>#</th> <th>Title</th> <th>Description</th> <th>Character Set</th> <th>Expressed In</th> </tr> </thead> <tbody> <?php $i = 1; $sql_query = "SELECT * FROM DataFormat"; $results = mysql_query($sql_query, $db); while ($result = mysql_fetch_array($results)) { $df_name = $result['name']; $df_id = $result['id']; echo "<tr>" . "<td>" . $i . "</td>" . "<td><a href='index.php?op=edit-dataFormat&id=" . $df_id . "' target='_blank'>" . $df_name . "</a></td>" . "<td>" . getElementValue("DataFormat", $df_id, "dct_description") . "</td>" . "<td>" . getElementValue("DataFormat", $df_id, "characterSet") . "</td>" . "<td>" . getElementValue("DataFormat", $df_id, "expressedIn") . "</td>" . "</tr>"; $i++; } ?> </tbody> <tfoot> <tr> <th>#</th> <th>Title</th> <th>Description</th> <th>Character Set</th> <th>Expressed In</th> </tr> </tfoot> </table> </div>