예제 #1
0
파일: paste.inc.php 프로젝트: mmr/b1n
  </p>

  <h4>Título</h4>
  <p>
    <input type='text' name='title' value='<?php 
echo $d['title'];
?>
'
      size='65' maxlength='128' />
  </p>

  <h4>Código Fonte</h4>
  <p>
    <textarea name='source' rows='10'
      cols='50'><?php 
echo Data::inHtml($d['source']);
?>
</textarea>
  </p>

  <h4>Digite o que você vê escrito na imagem</h4>
  <p>
    <img src='createimg.php' alt='' style='border: 1pt solid #fff' /><br />
    <input type='text' name='seccode' value='' size='10' maxlength='5' />
  </p>

  <hr />

  <p>
    <input type='submit' value='    É isso aí!    ' />
  </p>
예제 #2
0
파일: show.inc.php 프로젝트: mmr/b1n
<h3><?php 
echo $title;
?>
</h3>
<form id='f' method='get' action='<?php 
echo b1n_URL;
?>
'>
<p>
  <a href='<?php 
echo b1n_URL_ID . $r['id'];
?>
'
    title='<?php 
echo Data::inHtml($r['pas_title']);
?>
'><?php 
echo b1n_URL_ID . $r['id'];
?>
</a>
  <br/>
  <?php 
echo $author;
?>
 em  <?php 
echo $date;
?>
  <small>(<?php 
echo $language . ", " . $views . ", " . $size;
?>
예제 #3
0
파일: Search.lib.php 프로젝트: mmr/b1n
 public function show($d)
 {
     $q_orig = $d['q'];
     $this->check($d);
     $ret = $this->format($d['q']);
     if (empty($d['q'])) {
         $get_all = true;
         $d['query_where'] = '';
     } else {
         $get_all = false;
         $d['query_where'] = "\n      WHERE\n        pas_title   ILIKE '%" . $d['q'] . "%' OR\n        pas_source_text  ILIKE '%" . $d['q'] . "%' OR\n        pas_author  ILIKE '%" . $d['q'] . "%'";
     }
     $navigation = $this->getNavigationStuff($d, $c);
     $rs = $this->doSearch($d);
     if (is_array($rs)) {
         if (!$get_all) {
             $ret .= "<p>Foram encontrados {$c} registros para sua busca por '{$q_orig}'.</p>";
         } else {
             $ret .= "<p>Nenhum crit&eacute;rio para busca, mostrando todos {$c} registros.</p>";
         }
         $ret .= '<hr />';
         $base = b1n_URL_ACTION . '?action=list&amp;q=' . urlencode($q_orig) . '&amp;pg=' . $d['pg'] . '&amp;orderby=';
         $ret .= '<table id="search"><tr>';
         $ret .= '<th>&nbsp;</th>';
         foreach ($this->DATA as $col => $o) {
             $url = $base;
             $order = '';
             if (Data::cmp($d['orderby'], $o['db'])) {
                 if (Data::cmp($d['order'], 'DESC')) {
                     $order = '&amp;order=ASC';
                 } elseif (Data::cmp($d['order'], 'ASC')) {
                     $order = '&amp;order=DESC';
                 }
             }
             $ret .= '<th><a href="' . $base . $col . $order . '">' . $o['name'] . '</a></th>';
         }
         $ret .= '</tr>';
         $tr = 's_even';
         $i = 1 + ($d['pg'] - 1) * $d['per_page'];
         foreach ($rs as $r) {
             $id_base = base_convert($r['pas_id'], 10, b1n_CODE_BASE);
             $ret .= '<tr class="' . $tr . '">';
             $ret .= '<td class="s_number">' . $i . '</td>';
             $ret .= '<td class="s_title"><a href="' . b1n_URL_ID . $id_base . '">' . Data::inHtmlLimit($r['pas_title'], b1n_TITLE_MAX_CHARS) . '</a></td>';
             $ret .= '<td class="s_author">';
             if (strlen($r['pas_author'])) {
                 $ret .= '<a href="' . b1n_URL_ACTION . '?action=list&amp;q=' . urlencode($r['pas_author']) . '">' . Data::inHtmlLimit($r['pas_author'], b1n_AUTHOR_MAX_CHARS) . '</a>';
             } else {
                 $ret .= 'Anônimo';
             }
             $ret .= '</td>' . '<td>' . Data::inHtml($r['pas_language']) . '</td>';
             $ret .= '<td class="s_number">' . Data::inHtml($r['pas_view_qt']) . '</td>';
             $ret .= '<td class="s_number">' . Data::inHtml(Data::formatSize($r['pas_length'])) . '</td>';
             $ret .= '<td class="s_date">' . Data::formatDateShowAbr($r['pas_add_dt']) . '</td>';
             $ret .= '</tr>';
             $tr = $tr === 's_even' ? 's_odd' : 's_even';
             $i++;
         }
         $ret .= '</table>';
         if (!empty($navigation)) {
             $ret .= $navigation;
         }
     } else {
         $ret .= "Nenhum registro foi encontrado para sua busca por '{$q_orig}'";
     }
     return $ret;
 }
예제 #4
0
파일: rss.php 프로젝트: mmr/b1n
foreach ($rs as $r) {
    $title = $r['pas_title'] . ' (' . $r['pas_language'] . ', ' . $r['pas_view_qt'] . ', ' . Data::formatSize($r['pas_length']) . ')';
    $id = base_convert($r['pas_id'], 10, b1n_CODE_BASE);
    $dt = Data::formatDateShowRSS($r['pas_add_dt']);
    ?>
    <item>
      <title><?php 
    echo Data::inHtml($title);
    ?>
</title>
      <link><?php 
    echo b1n_URL_ID . $id;
    ?>
</link>
      <category><?php 
    echo Data::inHtml($r['pas_language']);
    ?>
</category>
      <pubDate><?php 
    echo $dt;
    ?>
</pubDate>
      <guid><?php 
    echo b1n_URL_ID . $id;
    ?>
</guid>
    </item>
<?php 
}
?>
  </channel>
예제 #5
0
파일: atom.php 프로젝트: mmr/b1n
    <entry>
      <title><?php 
    echo Data::inHtml($title);
    ?>
</title>
      <link rel="alternate" type="text/html"
        href="<?php 
    echo b1n_URL_ID . $id;
    ?>
"/>
      <issued><?php 
    echo $dt;
    ?>
</issued>
      <author><name><?php 
    echo Data::inHtml($r['pas_author']);
    ?>
</name></author>
      <modified><?php 
    echo $dt;
    ?>
</modified>
      <id><?php 
    echo b1n_URL_ID . $id;
    ?>
</id>
    </entry>
<?php 
}
?>
</feed>