コード例 #1
0
ファイル: images.php プロジェクト: Val-Git/icms2
 public function parse($value)
 {
     $images = is_array($value) ? $value : cmsModel::yamlToArray($value);
     $html = '';
     $small_preset = false;
     $a_class = '';
     foreach ($images as $key => $paths) {
         if (!isset($paths[$this->getOption('size_full')])) {
             continue;
         }
         $title = empty($this->item['title']) ? $this->name : $this->item['title'];
         if ($this->getOption('first_image_emphasize') && !$small_preset) {
             $small_preset = $this->getOption('size_full');
             $a_class = 'first_type_images';
         } else {
             $small_preset = $this->getOption('size_small');
             $a_class = 'second_type_images';
         }
         if (!empty($paths['original']) && strtolower(pathinfo($paths['original'], PATHINFO_EXTENSION)) === 'gif') {
             $html .= html_gif_image($paths, 'small', $title . ' ' . $key, array('class' => 'img-' . $this->getName()));
         } else {
             $html .= '<a title="' . htmlspecialchars($title) . '" class="img-' . $this->getName() . ' ' . $a_class . '" href="' . html_image_src($paths, $this->getOption('size_full'), true) . '">' . html_image($paths, $small_preset, $title . ' ' . $key) . '</a>';
         }
     }
     if ($html) {
         $html .= '<script>$(function() { icms.modal.bindGallery(".img-' . $this->getName() . '"); });</script>';
     }
     return $html;
 }
コード例 #2
0
ファイル: trove_cat_list.php プロジェクト: nterray/tuleap
function printnode($nodeid, $text, $delete_ok = false)
{
    global $Language;
    // print current node, then all subnodes
    print '<BR>';
    for ($i = 0; $i < $GLOBALS['depth']; $i++) {
        print "&nbsp; &nbsp; ";
    }
    html_image('ic/cfolder15.png', array());
    print '&nbsp; ' . $text . " ";
    if ($nodeid != 0) {
        print '&nbsp; <A href="trove_cat_edit.php?trove_cat_id=' . $nodeid . '">[' . $Language->getText('admin_trove_cat_list', 'edit') . ']</A> ';
    }
    if ($delete_ok) {
        print '&nbsp; <A href="trove_cat_delete.php?trove_cat_id=' . $nodeid . '">[' . $Language->getText('admin_trove_cat_list', 'delete') . ']</A> ';
    }
    if ($nodeid != 0) {
        print '&nbsp;' . help_button('trove_cat', $nodeid) . "\n";
    }
    $GLOBALS["depth"]++;
    $res_child = db_query("SELECT trove_cat_id,fullname,parent FROM trove_cat " . "WHERE parent='{$nodeid}' ORDER BY fullpath");
    while ($row_child = db_fetch_array($res_child)) {
        $delete_ok = $row_child["parent"] != 0;
        printnode($row_child["trove_cat_id"], $row_child["fullname"], $delete_ok);
    }
    $GLOBALS["depth"]--;
}
コード例 #3
0
ファイル: trove_cat_list.php プロジェクト: pombredanne/tuleap
function printnode($nodeid, $text, $depth = 0, $delete_ok = false)
{
    global $Language;
    $purifier = Codendi_HTMLPurifier::instance();
    // print current node, then all subnodes
    print '<BR>';
    for ($i = 0; $i < $depth; $i++) {
        print "&nbsp; &nbsp; ";
    }
    html_image('ic/cfolder15.png', array());
    print '&nbsp; ' . $purifier->purify($text) . " ";
    if ($nodeid != 0) {
        print '&nbsp; <A href="trove_cat_edit.php?trove_cat_id=' . $nodeid . '">[' . $Language->getText('admin_trove_cat_list', 'edit') . ']</A> ';
    }
    if ($delete_ok) {
        print '&nbsp; <A href="trove_cat_delete.php?trove_cat_id=' . $nodeid . '">[' . $Language->getText('admin_trove_cat_list', 'delete') . ']</A> ';
    }
    if ($nodeid != 0) {
        print '&nbsp;' . help_button('trove_cat', $nodeid) . "\n";
    }
    $res_child = db_query("SELECT trove_cat_id,fullname,parent FROM trove_cat " . "WHERE parent='" . db_ei($nodeid) . "' ORDER BY fullpath");
    while ($row_child = db_fetch_array($res_child)) {
        $delete_ok = $row_child["parent"] != 0;
        printnode($row_child["trove_cat_id"], $row_child["fullname"], $depth + 1, $delete_ok);
    }
}
コード例 #4
0
 /**
  *  PrintAdminMessageOptions - prints the different administrator options for a message
  *
  *	@param   integer	The Message ID
  *	@param   integer	The Group ID
  *	@param   integer	The Thread ID : to return to the message if the user cancels (forumhtml only, not message.php)
  *	@param   integer	The Forum ID : to return to the message if the user cancels (forumhtml only, not message.php)
  *	@return  The HTML output
  */
 function PrintAdminMessageOptions($msg_id, $group_id, $thread_id = 0, $forum_id = 0)
 {
     global $HTML;
     $return = '<a href="admin/index.php?editmsg=' . $msg_id . '&group_id=' . $group_id . '&thread_id=' . $thread_id . '&forum_id=' . $forum_id . '">' . html_image('ic/forum_edit.gif', '37', '15', array('alt' => "Edit")) . "</a>";
     $return .= '    <a href="admin/index.php?deletemsg=' . $msg_id . '&group_id=' . $group_id . '&thread_id=' . $thread_id . '&forum_id=' . $forum_id . '">' . html_image('ic/forum_delete.gif', '16', '18', array('alt' => "Delete")) . "</a>";
     $return .= "<br>";
     return $return;
 }
コード例 #5
0
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $return = '';
     for ($i = 0; $i < $rowsCount; $i++) {
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($i) . '>' . '<td width="40%"><a href="' . util_make_url_u(db_result($result, $i, 'user_name'), db_result($result, $i, 'user_id')) . '">' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'user_name') . '</a></td>' . '<td width="60%">' . db_result($result, $i, 'realname') . '</td>' . '</tr>';
     }
     return $return;
 }
コード例 #6
0
ファイル: image.php プロジェクト: asphix/icms2
 public function parse($value)
 {
     $paths = is_array($value) ? $value : cmsModel::yamlToArray($value);
     if (!$paths && $this->hasDefaultValue()) {
         $paths = $this->parseDefaultPaths();
     }
     if (!$paths || !isset($paths[$this->getOption('size_full')])) {
         return '';
     }
     return html_image($paths, $this->getOption('size_full'), empty($this->item['title']) ? $this->name : $this->item['title']);
 }
コード例 #7
0
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $dateFormat = _('Y-m-d H:i');
     $return = '';
     for ($i = 0; $i < $rowsCount; $i++) {
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($i) . '><td width="50%"><a href="' . util_make_url('/forum/message.php?msg_id=' . db_result($result, $i, 'msg_id')) . '">' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'subject') . '</a></td>' . '<td width="30%">' . db_result($result, $i, 'realname') . '</td>' . '<td width="20%">' . date($dateFormat, db_result($result, $i, 'post_date')) . '</td></tr>';
     }
     return $return;
 }
コード例 #8
0
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $groupId = $this->groupId;
     $dateFormat = _('Y-m-d H:i');
     $return = '';
     for ($i = 0; $i < $rowsCount; $i++) {
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($i) . '>' . '<td>' . db_result($result, $i, 'artifact_id') . '</td>' . '<td><a href="' . util_make_url('/tracker/?group_id=' . $groupId . '&amp;atid=' . db_result($result, $i, 'group_artifact_id') . '&amp;func=detail&aid=' . db_result($result, $i, 'artifact_id')) . '"> ' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'summary') . '</a></td>' . '<td>' . db_result($result, $i, 'realname') . "</td>" . '<td>' . date($dateFormat, db_result($result, $i, 'open_date')) . '</td></tr>';
     }
     return $return;
 }
コード例 #9
0
ファイル: image.php プロジェクト: Val-Git/icms2
 public function parseTeaser($value)
 {
     $paths = is_array($value) ? $value : cmsModel::yamlToArray($value);
     if (!$paths && $this->hasDefaultValue()) {
         $paths = $this->parseDefaultPaths();
     }
     if (!$paths || !isset($paths[$this->getOption('size_teaser')])) {
         return '';
     }
     $url = $this->teaser_url ? $this->teaser_url : href_to($this->item['ctype']['name'], $this->item['slug'] . ".html");
     return '<a href="' . $url . '">' . html_image($paths, $this->getOption('size_teaser'), empty($this->item['title']) ? $this->name : $this->item['title']) . '</a>';
 }
コード例 #10
0
ファイル: html.php プロジェクト: BackupTheBerlios/berlios
function html_dbimage($id)
{
    if (!$id || $id == 100) {
        return '';
    }
    $sql = "SELECT width,height " . "FROM db_images WHERE id='{$id}'";
    $result = db_query($sql);
    $rows = db_numrows($result);
    if (!$result || $rows < 1) {
        return db_error();
    } else {
        return html_image('dbimage.php?id=' . $id, db_result($result, 0, 'width'), db_result($result, 0, 'height'), array());
    }
}
コード例 #11
0
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $return = '';
     for ($i = 0; $i < $rowsCount; $i++) {
         if (db_result($result, $i, 'type') == 2) {
             $what = 'foundry';
         } else {
             $what = 'projects';
         }
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($i) . '>' . '<td width="30%"><a href="' . util_make_url('/' . $what . '/' . db_result($result, $i, 'unix_group_name') . '/') . '">' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . $this->highlightTargetWords(db_result($result, $i, 'group_name')) . '</a></td>' . '<td width="70%">' . $this->highlightTargetWords(db_result($result, $i, 'short_description')) . '</td></tr>';
     }
     return $return;
 }
コード例 #12
0
ファイル: images.php プロジェクト: asphix/icms2
 public function parse($value)
 {
     $images = is_array($value) ? $value : cmsModel::yamlToArray($value);
     $html = '';
     foreach ($images as $key => $paths) {
         if (!isset($paths[$this->getOption('size_full')])) {
             continue;
         }
         $html .= '<a class="img-' . $this->getName() . '" href="' . html_image_src($paths, $this->getOption('size_full'), true) . '">' . html_image($paths, 'small', (empty($this->item['title']) ? $this->name : $this->item['title']) . ' ' . $key) . '</a>';
     }
     if ($html) {
         $html .= '<script>$(document).ready(function() { icms.modal.bindGallery(".img-' . $this->getName() . '"); });</script>';
     }
     return $html;
 }
コード例 #13
0
ファイル: fulltext_search.php プロジェクト: Val-Git/icms2
 public function run()
 {
     $ctypes = $this->model->getContentTypes();
     $sources = array_collection_to_list($ctypes, 'name', 'title');
     foreach ($sources as $name => $title) {
         $sources[$name] = $title;
     }
     // по каким полям поиск
     $match_fields = array();
     // какие поля получать
     $select_fields = array();
     // из каких таблиц выборка
     $table_names = array();
     // какие поля точно нужны
     $default_fields = array('id', 'slug', 'date_pub');
     foreach ($ctypes as $ctype) {
         $fields = $this->model->getContentFields($ctype['name']);
         $table_names[$ctype['name']] = $this->model->getContentTypeTableName($ctype['name']);
         $select_fields[$ctype['name']] = $default_fields;
         foreach ($fields as $field) {
             // индексы создаются только на поля типа caption, text, html
             // в настройках полей должно быть включено их участие в индексе
             $is_text = in_array($field['type'], array('caption', 'text', 'html')) && $field['handler']->getOption('in_fulltext_search');
             if ($is_text && !$field['is_private'] && (!$field['groups_read'] || $this->cms_user->isInGroups($field['groups_read']))) {
                 $match_fields[$ctype['name']][] = $field['name'];
                 $select_fields[$ctype['name']][] = $field['name'];
             }
             if ($field['type'] == 'image' && !$field['is_private'] && (!$field['groups_read'] || $this->cms_user->isInGroups($field['groups_read']))) {
                 $select_fields[$ctype['name']]['image'] = $field['name'];
             }
         }
         $filters[$ctype['name']] = array(array('condition' => '=', 'value' => 1, 'field' => 'is_pub'), array('condition' => '=', 'value' => 1, 'field' => 'is_approved'), array('condition' => 'IS', 'value' => NULL, 'field' => 'is_parent_hidden'));
         $_ctypes[$ctype['name']] = $ctype;
     }
     return array('name' => $this->name, 'sources' => $sources, 'table_names' => $table_names, 'match_fields' => $match_fields, 'select_fields' => $select_fields, 'filters' => $filters, 'item_callback' => function ($item, $model, $sources_name, $match_fields, $select_fields) use($_ctypes) {
         $fields = array();
         foreach ($match_fields as $match_field) {
             if ($match_field == 'title') {
                 continue;
             }
             $fields[$match_field] = $item[$match_field];
         }
         return array_merge($item, array('url' => href_to($sources_name, $item['slug'] . '.html'), 'ctype' => $_ctypes[$sources_name], 'title' => $item['title'], 'fields' => $fields, 'date_pub' => $item['date_pub'], 'image' => !empty($select_fields['image']) ? html_image($item[$select_fields['image']], 'small', strip_tags($item['title'])) : ''));
     });
 }
コード例 #14
0
function printnode($nodeid, $text)
{
    // print current node, then all subnodes
    print '<BR>';
    for ($i = 0; $i < $GLOBALS[depth]; $i++) {
        print "&nbsp; &nbsp; ";
    }
    print html_image('images/ic/cfolder15.png', '15', '13', array());
    print '&nbsp; ' . $text . " ";
    print '<A href="trove_cat_edit.php?trove_cat_id=' . $nodeid . '">[Edit]</A> ';
    print help_button('trove_cat', $nodeid) . "\n";
    $GLOBALS["depth"]++;
    $res_child = db_query("SELECT trove_cat_id,fullname FROM trove_cat " . "WHERE parent='{$nodeid}'");
    while ($row_child = db_fetch_array($res_child)) {
        printnode($row_child["trove_cat_id"], $row_child["fullname"]);
    }
    $GLOBALS["depth"]--;
}
コード例 #15
0
    /**
     * getRows - get the html output for result rows
     *
     * @return string html output
     */
    function getRows()
    {
        $rowsCount = $this->searchQuery->getRowsCount();
        $result =& $this->searchQuery->getResult();
        $dateFormat = _('Y-m-d H:i');
        $group = group_get_object($this->groupId);
        $group_name = $group->getUnixName();
        $data = unserialize(db_result($result, 0, 'versiondata'));
        $return = '';
        for ($i = 0; $i < $rowsCount; $i++) {
            $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($i) . '>' . '<td>';
            $return .= util_make_link('/wiki/g/' . $group_name . '/' . db_result($result, $i, 'pagename'), html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'pagename'));
            $return .= '</td>
				<td width="15%">' . $data['author'] . '</td>
				<td width="15%">' . date($dateFormat, db_result($result, $i, 'mtime')) . '</td></tr>';
        }
        return $return;
    }
コード例 #16
0
ファイル: last_months.module.php プロジェクト: nldfr219/zhi
function module_last_months($arguments)
{
    global $lvc_nb_last_months;
    global $lvc_site_opening_month;
    global $lvc_site_opening_year;
    global $lvm_month, $lvm_archived, $lvm_arr_months;
    $buffer = '';
    $month = date('n');
    $year = date('Y');
    $finished = false;
    $buffer .= "<TABLE CELLSPACING=0 BORDER=0>\n";
    for ($count = 1; $count <= $lvc_nb_last_months; $count++) {
        $buffer .= "<TR><TD>&nbsp;";
        if ($finished) {
            $archive = '';
        } else {
            $data = archive_month($month, $year, 'code');
            if ($data[0] == NO_ARCHIVE) {
                $archive = '';
            } elseif ($data[0] == DB_ERROR) {
                $archive = '<A CLASS="archived">[?]</A>';
            } else {
                $archive = '<A CLASS="archived">[' . $lvm_archived . ']</A>';
            }
        }
        if (!$finished) {
            $finished = $month == $lvc_site_opening_month && $year == $lvc_site_opening_year;
            $the_month = $month < 10 ? "0" . $month : $month;
            $link = "./?view=month&year=" . $year . "&month=" . $the_month;
            $buffer .= '&nbsp;' . html_link($link, html_image('images/' . ICON_PUCE)) . '&nbsp;';
            $buffer .= "<A HREF='" . $link . "'>";
            $buffer .= $lvm_arr_months[$month];
            $buffer .= " " . $year;
            $buffer .= "</A>";
            $month = $month == 1 ? 12 : $month - 1;
            $year = $month == 12 ? $year - 1 : $year;
        }
        $buffer .= "&nbsp;</TD><TD ALIGN='center'>&nbsp;";
        $buffer .= $archive;
        $buffer .= "&nbsp;</TD></TR>";
    }
    $buffer .= "</TABLE>";
    return $buffer;
}
コード例 #17
0
ファイル: images.php プロジェクト: uralmax89/icms2
 public function parse($value)
 {
     $images = is_array($value) ? $value : cmsModel::yamlToArray($value);
     $html = '';
     foreach ($images as $key => $paths) {
         if (!isset($paths[$this->getOption('size_full')])) {
             continue;
         }
         if (!empty($paths['original']) && strtolower(pathinfo($paths['original'], PATHINFO_EXTENSION)) === 'gif') {
             $html .= html_gif_image($paths, 'small', (empty($this->item['title']) ? $this->name : $this->item['title']) . ' ' . $key, array('class' => 'img-' . $this->getName()));
         } else {
             $html .= '<a class="img-' . $this->getName() . '" href="' . html_image_src($paths, $this->getOption('size_full'), true) . '">' . html_image($paths, 'small', (empty($this->item['title']) ? $this->name : $this->item['title']) . ' ' . $key) . '</a>';
         }
     }
     if ($html) {
         $html .= '<script>$(function() { icms.modal.bindGallery(".img-' . $this->getName() . '"); });</script>';
     }
     return $html;
 }
コード例 #18
0
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $dateFormat = _('Y-m-d H:i');
     $return = '';
     $rowColor = 0;
     $lastTracker = null;
     for ($i = 0; $i < $rowsCount; $i++) {
         //section changed
         $currentTracker = db_result($result, $i, 'name');
         if ($lastTracker != $currentTracker) {
             $return .= '<tr><td colspan="5">' . $currentTracker . '</td></tr>';
             $lastTracker = $currentTracker;
             $rowColor = 0;
         }
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($rowColor) . '>' . '<td width="5%">&nbsp;</td>' . '<td>' . db_result($result, $i, 'artifact_id') . '</td>' . '<td>' . '<a href="' . util_make_url('/tracker/?func=detail&group_id=' . $this->groupId . '&aid=' . db_result($result, $i, 'artifact_id') . '&atid=' . db_result($result, $i, 'group_artifact_id')) . '">' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'summary') . '</a></td>' . '<td width="15%">' . db_result($result, $i, 'realname') . '</td>' . '<td width="15%">' . date($dateFormat, db_result($result, $i, 'open_date')) . '</td></tr>';
         $rowColor++;
     }
     return $return;
 }
コード例 #19
0
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $dateFormat = _('Y-m-d H:i');
     $return = '';
     $lastDocGroup = null;
     $rowColor = 0;
     for ($i = 0; $i < $rowsCount; $i++) {
         //section changed
         $currentDocGroup = db_result($result, $i, 'groupname');
         if ($lastDocGroup != $currentDocGroup) {
             $return .= '<tr><td colspan="4">' . $currentDocGroup . '</td></tr>';
             $lastDocGroup = $currentDocGroup;
             $rowColor = 0;
         }
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($rowColor) . '>' . '<td width="5%">&nbsp;</td>' . '<td>' . db_result($result, $i, 'docid') . '</td>' . '<td><a href="' . util_make_url('/docman/view.php/' . $this->groupId . '/' . db_result($result, $i, 'docid') . '/' . db_result($result, $i, 'title')) . '">' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'title') . '</a></td>' . '<td>' . db_result($result, $i, 'description') . '</td></tr>';
         $rowColor++;
     }
     return $return;
 }
コード例 #20
0
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $dateFormat = _('Y-m-d H:i');
     $return = '';
     $rowColor = 0;
     $lastProjectName = null;
     for ($i = 0; $i < $rowsCount; $i++) {
         //section changed
         $currentProjectName = db_result($result, $i, 'project_name');
         if ($lastProjectName != $currentProjectName) {
             $return .= '<tr><td colspan="7">' . $currentProjectName . '</td></tr>';
             $lastProjectName = $currentProjectName;
             $rowColor = 0;
         }
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($rowColor) . '>' . ' <td width="5%">&nbsp;</td>' . ' <td>' . db_result($result, $i, 'project_task_id') . '</td>' . ' <td>' . '<a href="' . util_make_url('/pm/task.php?func=detailtask&project_task_id=' . db_result($result, $i, 'project_task_id') . '&group_id=' . $this->groupId . '&group_project_id=' . db_result($result, $i, 'group_project_id')) . '">' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'summary') . '</a></td>' . ' <td width="15%">' . date($dateFormat, db_result($result, $i, 'start_date')) . '</td>' . ' <td width="15%">' . date($dateFormat, db_result($result, $i, 'end_date')) . '</td>' . ' <td width="15%">' . db_result($result, $i, 'realname') . '</td>' . ' <td width="8%">' . db_result($result, $i, 'percent_complete') . ' %</td></tr>';
         $rowColor++;
     }
     return $return;
 }
コード例 #21
0
function printnode($nodeid, $text)
{
    global $Language;
    print '<br />';
    for ($i = 0; $i < $GLOBALS[depth]; $i++) {
        print "&nbsp; &nbsp; ";
    }
    print html_image('ic/cfolder15.png', '15', '13', array());
    print '&nbsp; ' . $text . " ";
    print url_make_link("trove_cat_add.php?parent_trove_cat_id='.{$nodeid}.'", "[" . _('Add') . "]");
    if ($nodeid != 0) {
        print url_make_link("trove_cat_edit.php?parent_trove_cat_id='.{$nodeid}.'", "[" . _('Edit') . "]");
        print help_button('trove_cat', $nodeid) . "\n";
    }
    $GLOBALS['depth']++;
    $res_child = db_query("\n\t\tSELECT trove_cat_id,fullname FROM trove_cat \n\t\tWHERE parent='{$nodeid}'\n\t\tAND trove_cat_id!=0;\n\t");
    while ($row_child = db_fetch_array($res_child)) {
        printnode($row_child["trove_cat_id"], $row_child["fullname"]);
    }
    $GLOBALS["depth"]--;
}
コード例 #22
0
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $dateFormat = _('Y-m-d H:i');
     $return = '';
     $rowColor = 0;
     $lastForumName = null;
     for ($i = 0; $i < $rowsCount; $i++) {
         //section changed
         $currentForumName = db_result($result, $i, 'forum_name');
         if ($lastForumName != $currentForumName) {
             $return .= '<tr><td colspan="4">' . $currentForumName . '</td></tr>';
             $lastForumName = $currentForumName;
             $rowColor = 0;
         }
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($rowColor) . '>' . '<td width="5%">&nbsp;</td>' . '<td><a href="' . util_make_url('/forum/message.php?msg_id=' . db_result($result, $i, 'msg_id')) . '">' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'subject') . '</a></td>' . '<td width="15%">' . db_result($result, $i, 'realname') . '</td>' . '<td width="15%">' . date($dateFormat, db_result($result, $i, 'post_date')) . '</td></tr>';
         $rowColor++;
     }
     return $return;
 }
コード例 #23
0
 /**
  * showTableNestedGroups - Display the tree of document groups
  *
  * This is a recursive function that is used to display the tree
  *
  * @param array Array of groups. This array contains information about the groups and their childs.
  * @param int The number of row that is currently being showed. It is used for formatting purposes
  * @param int The ID of the parent whose childs are being showed (0 for root groups)
  * @param int The current level
  */
 function showTableNestedGroups(&$group_arr, &$rowno, $parent = 0, $level = 0)
 {
     // No childs to display
     if (!is_array($group_arr) || !array_key_exists("{$parent}", $group_arr)) {
         return;
     }
     $child_count = count($group_arr["{$parent}"]);
     for ($i = 0; $i < $child_count; $i++) {
         $rowno++;
         $doc_group =& $group_arr["{$parent}"][$i];
         $margin = str_repeat("&nbsp;&nbsp;&nbsp;", $level);
         $img = "cfolder15.png";
         /*
         			// Display the folder icon opened or closed?
         			if (array_key_exists("".$doc_group->getID(),$group_arr)) $img = "ofolder15.png";
         			else $img = "cfolder15.png";
         */
         echo '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($rowno) . '>' . '<td>' . $doc_group->getID() . '</td>' . '<td>' . $margin . html_image('ic/' . $img, "15", "13", array("border" => "0")) . ' ' . '<a href="index.php?editgroup=1&amp;doc_group=' . $doc_group->getID() . '&amp;group_id=' . $doc_group->Group->getID() . '">' . $doc_group->getName() . '</a></td></tr>';
         // Show childs (if any)
         $this->showTableNestedGroups($group_arr, $rowno, $doc_group->getID(), $level + 1);
     }
 }
コード例 #24
0
ファイル: mod-limited.php プロジェクト: neymanna/fusionforge
    } else {
        $img = "mail16w.png";
        $key = "monitor";
    }
    echo '
				<a href="index.php?group_id=' . $group_id . '&amp;artifact_id=' . $ah->getID() . '&amp;atid=' . $ath->getID() . '&amp;func=monitor"><strong>' . html_image('ic/' . $img . '', '20', '20', array()) . ' ' . $key . '</strong></a>';
    ?>
&nbsp;<a href="javascript:help_window('<?php 
    echo util_make_url('/help/tracker.php?helpname=monitor');
    ?>
')"><strong>(?)</strong></a>
			</td>
			<td><?php 
    if ($group->usesPM()) {
        echo '
				<a href="' . getStringFromServer('PHP_SELF') . '?func=taskmgr&amp;group_id=' . $group_id . '&amp;atid=' . $atid . '&amp;aid=' . $aid . '">' . html_image('ic/taskman20w.png', '20', '20', array()) . '<strong>' . _('Build Task Relation') . '</strong></a>';
    }
    ?>
			</td>
			<td>
				<input type="submit" name="submit" value="<?php 
    echo _('Submit');
    ?>
" />
			</td>
		</tr>
	</table>
<?php 
}
?>
<table border="0" width="80%">
コード例 #25
0
     }
     ###
     # Version
     ###
     if ($GLOBALS['settings']['version']) {
         html_table_col_begin();
         html_link($GLOBALS['appname'] . '/index.php?op=history&file=' . $files['name'] . '&path=' . $path, $files['version'], NULL, True, NULL, '_new');
         html_table_col_end();
     }
     ###
     # Deleteable (currently not used)
     ###
     if ($GLOBALS['settings']['deleteable']) {
         if ($files['deleteable'] == 'N') {
             html_table_col_begin();
             html_image('images/locked.png', lang('Locked'));
             html_table_col_end();
         } else {
             html_table_col_begin();
             html_table_col_end();
         }
     }
     html_table_row_end();
     if ($files['mime_type'] == 'Directory') {
         $usedspace += $fileinfo[0];
     } else {
         $usedspace += $files['size'];
     }
 }
 html_table_end();
 html_break(2);
コード例 #26
0
ファイル: theme.php プロジェクト: BackupTheBerlios/berlios
function theme_header($params)
{
    global $HTML;
    $HTML->generic_header_start($params);
    //determine font for this platform
    if (browser_is_windows() && browser_is_ie()) {
        //ie needs smaller fonts
        $font_size = 'x-small';
        $font_smaller = 'xx-small';
        $font_smallest = '7pt';
    } else {
        if (browser_is_windows()) {
            //netscape on wintel
            $font_size = 'small';
            $font_smaller = 'x-small';
            $font_smallest = 'x-small';
        } else {
            if (browser_is_mac()) {
                //mac users need bigger fonts
                $font_size = 'medium';
                $font_smaller = 'small';
                $font_smallest = 'x-small';
            } else {
                //linux and other users
                $font_size = 'small';
                $font_smaller = 'x-small';
                $font_smallest = 'xx-small';
            }
        }
    }
    //themable someday?
    $site_fonts = 'verdana,arial,helvetica,sans-serif';
    ?>

		<style type="text/css">
			<!--
	OL,UL,P,BODY,TD,TR,TH,FORM { font-family: <?php 
    echo $GLOBALS['FONT_CONTENT'] . ',' . $site_fonts;
    ?>
; font-size:<?php 
    echo $font_size;
    ?>
; color: #333333; }

	H1 { font-size: x-large; font-family: <?php 
    echo $site_fonts;
    ?>
; }
	H2 { font-size: large; font-family: <?php 
    echo $site_fonts;
    ?>
; }
	H3 { font-size: medium; font-family: <?php 
    echo $site_fonts;
    ?>
; }
	H4 { font-size: small; font-family: <?php 
    echo $site_fonts;
    ?>
; }
	H5 { font-size: x-small; font-family: <?php 
    echo $site_fonts;
    ?>
; }
	H6 { font-size: xx-small; font-family: <?php 
    echo $site_fonts;
    ?>
; }

	PRE,TT { font-family: courier,sans-serif }

	SPAN.center { text-align: center }
	SPAN.boxspace { font-size: 2pt; }
	SPAN.osdn {font-size: <?php 
    echo $font_smaller;
    ?>
; font-family: verdana,arial,helvetica,sans-serif;}
        SPAN.search {font-size: <?php 
    echo $font_smaller;
    ?>
; font-family: verdana,arial,helvetica,sans-serif;}
        SPAN.slogan {font-size: large; font-weight: bold; font-family: verdana,arial,helvetica,sans-serif;}
        SPAN.footer {font-size: <?php 
    echo $font_smaller;
    ?>
; font-family: verdana,arial,helvetica,sans-serif;}

	A.maintitlebar { color: #FFFFFF }
	A.maintitlebar:visited { color: #FFFFFF }

	A.sortbutton { color: #FFFFFF; text-decoration: underline; }
	A.sortbutton:visited { color: #FFFFFF; text-decoration: underline; }

	.menus { color: #6666aa; text-decoration: none; }
	.menus:visited { color: #6666aa; text-decoration: none; }

	A:link { text-decoration:none }
	A:visited { text-decoration:none }
	A:active { text-decoration:none }
	A:hover { text-decoration:underline; color:#FF0000 }

	.tabs { color: #000000; }
	.tabs:visited { color: #000000; }
	.tabs:hover { color:#FF0000; }
	.tabselect { color: #000000; font-weight: bold; }
	.tabselect:visited { font-weight: bold;}
	.tabselect:hover { color:#FF0000; font-weight: bold; }

	.titlebar { text-decoration:none; color:#000000; font-family: <?php 
    echo $GLOBALS['FONT_HTMLBOX_TITLE'] . ',' . $site_fonts;
    ?>
; font-size: <?php 
    echo $GLOBALS['FONTSIZE_HTMLBOX_TITLE'];
    ?>
; font-weight: bold; }
	.develtitle { color:#000000; font-weight: bold; }
	.legallink { color:#000000; font-weight: bold; }
			-->
		</style>
	
	<?php 
    $HTML->generic_header_end($params);
    ?>
<body text="#333333" link="#6666aa" alink="#aa6666" vlink="#6666aa" bgcolor="#6C7198" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php 
    /*
    	OSDN NAV BAR
    */
    osdn_print_navbar();
    echo html_blankimage(5, 100) . '<br>';
    ?>
<!-- start page body -->
<CENTER>
<table cellpadding="0" cellspacing="0" border="0" width="99%">
	<tr>
		<td background="<?php 
    echo $GLOBALS['sys_themeimgroot'];
    ?>
tbar1.png" width="1%" height="17"><img src="<?php 
    echo $GLOBALS['sys_themeimgroot'];
    ?>
tleft1.png" width="17" height="17" alt=" "></td>
		<td background="<?php 
    echo $GLOBALS['sys_themeimgroot'];
    ?>
tbar1.png" align="center" colspan="3" width="99%"><img src="<?php 
    echo $GLOBALS['sys_themeimgroot'];
    ?>
tbar1.png" width="1" height="17" alt=" "></td>
		<td><img src="<?php 
    echo $GLOBALS['sys_themeimgroot'];
    ?>
tright1.png" width="17" height="17" alt=" "></td>
	</tr>
	<tr>
		<td width="17" background="<?php 
    echo $GLOBALS['sys_themeimgroot'];
    ?>
leftbar1.png" align="left" valign="bottom"><img src="<?php 
    echo $GLOBALS['sys_themeimgroot'];
    ?>
leftbar1.png" width="17" height="25" alt=" "></td>
		<td colspan="3" bgcolor="#ffffff">


<!-- start main body cell -->

	<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tr>
			<td width="141" background="<?php 
    echo $GLOBALS['sys_themeimgroot'];
    ?>
steel3.jpg" bgcolor="#cfd1d4" align="left" valign="top">

	<CENTER>
	<a href="/"><?php 
    echo html_image($GLOBALS['sys_themeimgroot'] . "berliOS_small_logo.png", "136", "79", array("alt" => " SourceForge ", "border" => "0"));
    ?>
</A>
	</CENTER>
	<P>
	<!-- menus -->
	<?php 
    html_blankimage(1, 140);
    menu_print_sidebar($params);
    ?>
	<P>
	</TD>

	<td width="20" background="<?php 
    echo $GLOBALS['sys_themeimgroot'];
    ?>
fade1.png" nowrap><img src="<?php 
    echo $GLOBALS['sys_themeimgroot'];
    ?>
fade1.png" width="20" height="35" alt=" "></td>
	<td valign="top" bgcolor="<?php 
    echo $GLOBALS['COLOR_CONTENT_BACK'];
    ?>
" width="99%">
	<BR>
	<?php 
}
コード例 #27
0
ファイル: group_header.tpl.php プロジェクト: Val-Git/icms2
    $this->addToolButton(array('title' => LANG_GROUPS_JOIN, 'class' => 'user_add', 'href' => $this->href_to($group['id'], 'join'), 'confirm' => LANG_GROUPS_JOIN . '?'));
}
if ($user->id && $is_member && !$is_owner) {
    $this->addToolButton(array('title' => LANG_GROUPS_LEAVE, 'class' => 'user_delete', 'href' => $this->href_to($group['id'], 'leave'), 'confirm' => LANG_GROUPS_LEAVE . '?'));
}
if (cmsUser::isAllowed('groups', 'delete', 'all') || cmsUser::isAllowed('groups', 'delete', 'own') && $is_owner) {
    $this->addToolButton(array('title' => LANG_GROUPS_DELETE, 'class' => 'delete ajax-modal', 'href' => $this->href_to($group['id'], 'delete')));
}
?>

<h1 id="group_profile_title">
	<?php 
if ($group['logo']) {
    ?>
		<span class="logo"><?php 
    echo html_image($group['logo'], 'micro', $group['title']);
    ?>
</span>
	<?php 
}
?>
    <?php 
html($group['title']);
?>
    <?php 
if ($group['is_closed']) {
    ?>
        <span class="is_closed" title="<?php 
    html(LANG_GROUP_IS_CLOSED_ICON);
    ?>
"></span>
コード例 #28
0
        }
        ?>
>
                        <?php 
        if (isset($fields['photo']) && $fields['photo']['is_in_list']) {
            ?>
                            <td class="photo">
                                <a href="<?php 
            echo href_to($ctype['name'], $item['slug'] . '.html');
            ?>
">
                                    <?php 
            if (!empty($item['photo'])) {
                ?>
                                        <?php 
                echo html_image($item['photo'], $fields['photo']['options']['size_teaser'], $item['title']);
                ?>
                                        <?php 
                unset($item['photo']);
                ?>
                                    <?php 
            }
            ?>
                                </a>
                            </td>
                        <?php 
        }
        ?>
                        <?php 
        if (!empty($item['rating_widget'])) {
            ?>
コード例 #29
0
ファイル: ind.php プロジェクト: neymanna/fusionforge
} else {
    echo '<p>' . _('Choose a tracker and you can browse/edit/add items to it.') . '<p>';
    /*
    Put the result set (list of trackers for this group) into a column with folders
    */
    $tablearr = array(_('Tracker'), _('Description'), _('Open'), _('Total'));
    echo $HTML->listTableTop($tablearr);
    for ($j = 0; $j < count($at_arr); $j++) {
        if (!is_object($at_arr[$j])) {
            //just skip it
        } elseif ($at_arr[$j]->isError()) {
            echo $at_arr[$j]->getErrorMessage();
        } else {
            echo '
		<tr ' . $HTML->boxGetAltRowStyle($j) . '>
			<td><a href="' . util_make_url('/tracker/?atid=' . $at_arr[$j]->getID() . '&amp;group_id=' . $group_id . '&func=browse') . '">' . html_image("ic/tracker20w.png", "20", "20", array("border" => "0")) . ' &nbsp;' . $at_arr[$j]->getName() . '</a>
			</td>
			<td>' . $at_arr[$j]->getDescription() . '
			</td>
			<td style="text-align:center">' . (int) $at_arr[$j]->getOpenCount() . '
			</td>
			<td style="text-align:center">' . (int) $at_arr[$j]->getTotalCount() . '
			</td>
		</tr>';
        }
    }
    echo $HTML->listTableBottom();
}
echo site_project_footer(array());
// Local Variables:
// mode: php
コード例 #30
0
ファイル: group_closed.tpl.php プロジェクト: asphix/icms2
$this->addBreadcrumb($group['title']);
?>

<div id="group_profile_header">
    <?php 
$this->renderChild('group_header', array('group' => $group));
?>
</div>

<div id="group_profile">

    <div id="left_column" class="column">

        <div id="logo" class="block">
            <?php 
echo html_image($group['logo'], 'normal', $group['title']);
?>
        </div>

    </div>

    <div id="right_column" class="column">

        <div id="information" class="content_item block">

            <div class="group_description">
                <?php 
echo LANG_GROUP_IS_CLOSED;
?>
            </div>