コード例 #1
0
ファイル: admin_spacenews.php プロジェクト: cwcw/cms
 }
 echo label(array('type' => 'form-start', 'name' => 'thevalueform', 'action' => $newurl, 'other' => ' onSubmit="return validate(this)"'));
 echo label(array('type' => 'div-start'));
 echo label(array('type' => 'table-start'));
 if (checkperm('needcheck')) {
     echo label(array('type' => 'text', 'alang' => 'common_note', 'text' => $alang['spacenews_needcheck']));
 }
 if ($page == 1) {
     if (empty($thevalue['styletitle'])) {
         $mktitlestyle = '';
     } else {
         $mktitlestyle = mktitlestyle($thevalue['styletitle']);
     }
     echo '<tr id="tr_subject"><th>' . $alang['spacenews_title_subject'] . '</th><td><input name="subject" type="text" id="subject" onblur="relatekw();" size="60" maxlength="80" value="' . shtmlspecialchars($thevalue['subject']) . '" style="width: 500px;' . $mktitlestyle . '"  onkeyup="textCounter(this, \'maxlimit\', 80);" /><br />' . $alang['spacenews_title_subject_note'] . '</td></tr>';
     if (checkperm('managecheck')) {
         printjs();
         print <<<EOF
t\t<tr>
t\t<th>{$alang['titlestyle']}
t\t</th>
t\t<td>{$alang['titlestylecolor']}
t\t\t<select name="fontcolor" id="fontcolor" onChange="settitlestyle();" style="width: 80px;background-color: #000000">
  \t\t\t   <option value="" selected="selected">default</option>
t\t\t</select> 
t\t\t{$alang['titlestylesize']}
t\t     \t<select name="fontsize" id="fontsize" onChange="settitlestyle();">
  \t\t\t   <option value="" selected="selected">default</option>
  \t\t\t   <option value="12px">12px</option>
  \t\t\t   <option value="13px">13px</option>
  \t\t\t   <option value="14px">14px</option>
  \t\t\t   <option value="16px">16px</option>
コード例 #2
0
     $row['antcom'] = select($conn, "COUNT(*) AS 'antcom'", "as_Comment", "Project_id = " . $row["id"])->fetch_assoc()["antcom"];
     $row['type'] = select($conn, "type", "as_Post", "id = " . $row['id'])->fetch_assoc()['type'];
     if (isset($_GET['user'])) {
         if (select($conn, "*", "as_Vote", "user = "******"user"] . " AND target_id = " . $row["id"] . " AND target = 'as_Post'")->fetch_assoc()['id'] != null) {
             $row['hasvoted'] = "true";
         } else {
             $row['hasvoted'] = "false";
         }
     }
     $taggarr = array();
     $tag = $conn->query("SELECT languageid FROM as_Language WHERE projectid = " . $_GET["id"]);
     while ($tageg = $tag->fetch_assoc()) {
         array_push($taggarr, $conn->query("SELECT `name` FROM as_Language_master WHERE id = " . $tageg["languageid"])->fetch_assoc()["name"]);
     }
     $row['taggs'] = implode(", ", $taggarr);
     printjs($row);
 } else {
     $result = selectorder($conn, "*", "as_Post", "public = 1", "id DESC");
     if (isset($_GET["type"])) {
         if ($_GET["type"] == "kake") {
             echo "[{\"id\":\"1\",\"title\":\"KAKE\",\"user_id\":\"1\",\"date\":\"1000000000\",\"public\":\"1\",\"desc\":\"KAKE!KAKE!KAKE!KAKE!KAKE!KAKE!KAKE!KAKE!KAKE!KAKE!KAKE!KAKE!KAKE!KAKE!KAKE!\",\"type\":\"KAKE\",\"antcom\":\"10000000\",\"votes\":\"1000000\",\"taggs\":\"KAKE\"}]";
             return;
         } else {
             if ($_GET["type"] == "question" || $_GET["type"] == "tutorial" || $_GET["type"] == "showcase") {
                 $result = selectorder($conn, "*", "as_Post", "public = 1 AND type = '" . $_GET["type"] . "'", "id DESC");
             }
         }
     }
     $arr = array();
     while ($row = $result->fetch_assoc()) {
         if (isset($_GET['user'])) {