当前位置: 首页>>代码示例>>PHP>>正文


PHP thesaurus::name方法代码示例

本文整理汇总了PHP中thesaurus::name方法的典型用法代码示例。如果您正苦于以下问题:PHP thesaurus::name方法的具体用法?PHP thesaurus::name怎么用?PHP thesaurus::name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在thesaurus的用法示例。


在下文中一共展示了thesaurus::name方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: show

 function show()
 {
     if (system::getval(debug)) {
         echo "<div id='login_debug'>";
     } else {
         echo "<div id='login'>";
     }
     if ($userID = session::get("user")) {
         // change password
         if ($_GET[action] == "change") {
             echo "<form method='get' action='index.php'>";
             echo form::field("password", "password", "", "", "", "<i>Neues Passort</i>", "", "newpassword");
             echo form::field("submit", "b1", "&auml;ndern");
             echo form::field("hidden", "action", "changedo");
             echo "</form>";
         } else {
             echo "<span class='normal'>Angemeldet: </span><span class='red'>" . user::name($userID) . " </span>";
             echo form::link("", " - abmelden ", "index.php?action=logout", "logout");
             echo form::link("", " - Passwort &auml;ndern ", "index.php?action=change", "change-password");
             // if su display admin
             echo form::link("", " - Administration", "admin.php", "admin");
             if ($_SESSION['show']) {
                 echo form::link("", " - Import into <b>" . thesaurus::name($_SESSION['show']) . "</b>", "import.php?id=" . $_SESSION['show'], "import");
             }
             // menu switches
             action::hyrarchy();
             // toggle hyrarchy off / on
             action::descriptor();
             action::visible();
             action::tooltips();
             // toggle tooltips off / on
             if (right::write()) {
                 action::edit();
             }
             // show edit function
             action::listit();
             action::debug();
         }
     } else {
         echo "<span class='normal'>";
         echo "<form method='get' action='index.php'>";
         echo "<i>Benutzername </i><input type='text' name='user' value='{$user}'>";
         echo " <i>Passwort </i><input type='password' name='password'>";
         echo " <input type='submit' name='action' value='anmelden'>";
         echo "<input type='hidden' name='action' value='login'>";
         echo "</form>";
         echo "</span>";
     }
     // display javascript status
     /*      echo "<span class='small'>";
             if (session::get("JS")) echo "JavaScript aktiv";
             else echo "kein Javascript";
           echo "</span>";*/
     echo "</div>";
 }
开发者ID:nibble-arts,项目名称:openthesaurus,代码行数:55,代码来源:user.php

示例2: descriptor

 function descriptor($id, $highlight = "", $view = "")
 {
     echo "<div id='export'>";
     $dataArray = thesaurus::get_descriptor($id);
     $linkArray = thesaurus::get_link($id, session::get(descriptor));
     $separator = FALSE;
     $isDescriptor = thesaurus::is_descriptor($id);
     //------------------------------------------------------------------------------
     // icons for actions
     echo "<p>";
     if ($view) {
         echo "<div id='box'>";
         echo "<table width='100%'><tr>";
         echo "<td>";
         echo form::link("opentree", "[+]", "index.php?action=showhyrarchy&amp;id={$id}", "opentree");
         // open hyrarchy tree
         echo " " . form::link("edit", "edit", "index.php?action=edit&amp;id={$id}", "edit");
         // link icons
         echo " " . form::link("link", "OB", "index.php?linkaction=link&amp;link={$id}&amp;id={$id}&amp;linktype=1", "newlink_1");
         echo " " . form::link("equiv", "BS", "index.php?linkaction=link&amp;link={$id}&amp;id={$id}&amp;linktype=2", "newlink_2");
         echo " " . form::link("assoc", "VB", "index.php?linkaction=link&amp;link={$id}&amp;id={$id}&amp;linktype=3", "newlink_3");
         echo " " . form::link("add", "add", "index.php?action=add&amp;parent={$id}", "add");
         echo "</td>";
         // print tree
         echo "<td>";
         echo " " . form::link("", "txt", "csv.php?id={$id}&amp;type=txt", "csv");
         echo "</td>";
         // print csv
         echo "<td>";
         echo " " . form::link("", "csv", "csv.php?id={$id}&amp;type=csv", "csv");
         echo "</td>";
         echo "<td align='right'>";
         // export Adlib
         echo "<td>";
         echo " " . form::link("", "adlib", "csv.php?id={$id}&amp;type=adlib", "adlib");
         echo "</td>";
         // set link
         $linkType = session::get(linktype);
         $linkIcon = array("", "dolink", "doequiv", "doassoc");
         if (session::get(link) != $id and session::get(link)) {
             echo "mit <b>'" . thesaurus::name(session::get(link)) . "'</b>' verknüpfen";
             echo " " . form::link($linkIcon[$linkType], $linkType, "index.php?linkaction=linkdo&amp;id={$id}", $linkIcon[$linkType]);
             echo " " . form::link("delete", "end", "index.php?linkaction=linkend", "end-linking");
         }
         echo "</td>";
         echo "</tr></table>";
         echo "</div>";
     }
     echo "</p>";
     //------------------------------------------------------------------------------
     // display name
     echo "<p>";
     echo "<span class='exporthead'><b>";
     $tempString = highlight($highlight, $dataArray[name], $isDescriptor);
     echo "<a href='index.php?action=show&amp;id={$id}'>";
     echo $tempString;
     // if javascript -> direkt edit
     if (session::get(JS)) {
     }
     echo grafik::disp("edit", "edit", 15);
     echo "</a>";
     echo "</b>";
     // display status of descriptor
     echo " <i>(" . thesaurus::get_status_name(thesaurus::get_status($id)) . ")</i>";
     // mark if kandidate
     if (!thesaurus::is_visible($id)) {
         echo "<br><span class='red'>versteckt</span>";
     }
     echo "</span>";
     // display type of descriptor
     echo "<br><i>" . thesaurus::get_name(thesaurus::get_thesaurus($id)) . "</i>";
     echo "</p>";
     //------------------------------------------------------------------------------
     // display comment
     echo "<p>";
     if ($dataArray[comment]) {
         echo "<tr><td></td>";
         echo "<td class='export'>";
         echo nl2br(highlight($highlight, $dataArray[comment]));
         echo "</td></tr>";
     }
     echo "</p>";
     //------------------------------------------------------------------------------
     // get link data for descriptor
     $parentArray = $linkArray[parent];
     $childArray = $linkArray[child];
     $assocArray = $linkArray[assoc];
     $equivArray = $linkArray[equiv];
     //------------------------------------------------------------------------------
     // list synonyms
     echo "<table>";
     if ($equivArray) {
         // sort for use and used for
         $x = $y = 0;
         foreach ($equivArray as $entry) {
             if ($entry > 0) {
                 $forArray[$x++] = $entry;
             } else {
                 $retArray[$x++] = abs($entry);
             }
//.........这里部分代码省略.........
开发者ID:nibble-arts,项目名称:openthesaurus,代码行数:101,代码来源:output.php

示例3: insert_entry

 function insert_entry($_arg, $errorArray, $value = "")
 {
     if ($_arg[action] == 'add' or $_arg[action] == 'insert' and $errorArray) {
         // set default value
         if ($value) {
             $_arg[name] = $value;
         }
         echo "<form name='descriptor' method='get' action='index.php'>";
         $name = thesaurus::name($_arg[parent]);
         if ($name) {
             echo "<p><b>Neuen Unterbegriff in '<span class='red'>";
             echo "<a href='index.php?action=show&amp;id={$_arg['parent']}'>{$name}</a>";
             echo "</span>' ";
             if (right::link()) {
                 echo "anlegen";
             } else {
                 echo "vorschlagen";
             }
             echo "</b></p>";
         } else {
             echo "<p><b>Neuen Thesaurus anlegen</b></p>";
         }
         $error = $errorArray[name];
         // name of new descriptor
         echo form::field("text", "name", $_arg[name], 30, "class='{$error}'", "<span class='small'>Name</span><br>", "", "name-field");
         switch ($error) {
             case exist:
                 echo "<br><b class='exist'>Eintrag existiert schon</b>";
                 echo form::link("", " Eintrag ansehen", "index.php?action=suchen&amp;searchString={$_arg['name']}&amp;searchtype=2", "showexist");
                 break;
             case alike:
                 /*              echo "<br><b class='exist'>Ähnliche Einträge existiert schon</b>";
                               echo form::link(""," Einträge ansehen","index.php?action=suchen&amp;searchString=$_arg[name]&amp;searchtype=1","showalike");
                 */
                 break;
             default:
                 break;
         }
         echo "<br>";
         // type of descriptor
         /*            $typeArray = thesaurus::get_type_list();
                     $entryType = thesaurus::get_entrytype($_arg[parent]);
                     echo form::selector("entrytype",$typeArray,1,"",$entryType[entrytype],"<span class='small'>Begriffstype</span><br>","","entrytype");
         */
         echo "<br>";
         // status of descriptor
         if (right::write()) {
             $statusArray = thesaurus::get_status_list();
             echo form::selector("status", $statusArray, 1, "", thesaurus::get_status($id), "<span class='small'>Status</span><br>", "", "statustype");
         } else {
             echo "<span class='small'>Status</span><br><span class='normal'>" . thesaurus::get_status_name(thesaurus::newstatus()) . "</span>";
             echo form::field("hidden", "status", thesaurus::newstatus());
         }
         echo "</p>";
         $error = $errorArray[comment];
         // comment field
         echo form::textfield("comment", $_arg[comment], 45, 3, "class='{$error}'", "Bemerkungen<br>", "", "comment-field");
         echo form::field("submit", "", "anlegen", "", "", "", "", "new");
         echo form::field("hidden", "parent", $_arg[parent]);
         echo form::field("hidden", "id", $_arg[id]);
         echo form::field("hidden", "action", "insert");
         echo form::field("hidden", "type", 1);
         echo "</form>";
     }
 }
开发者ID:nibble-arts,项目名称:openthesaurus,代码行数:65,代码来源:form.php


注:本文中的thesaurus::name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。