예제 #1
0
?>
  <div class="subBar <?php 
echo $comment->type;
?>
">
   <a href="view.php?useSessionFilter=true"><img src="icons/gohome.png" width="32" height="32" alt=""></a> &nbsp; &nbsp;
   <strong><?php 
echo iconForType($comment->type) . " #{$comment->id}";
?>
</strong> &nbsp; &nbsp; <?php 
echo $comment->date . "\n";
?>
  </div>
<?php 
if (isset($_POST['newRemark'])) {
    db_query("INSERT INTO LikeBackRemarks(dateTime, developer, commentId, remark) " . "VALUES('" . get_iso_8601_date(time()) . "', " . "'{$developer->id}', " . "'{$id}', " . "'" . addslashes($_POST['newRemark']) . "')");
}
?>

<?php 
$email = htmlentities($comment->email, ENT_QUOTES, "UTF-8");
if (!empty($email)) {
    $email = "<a href=\"mailto:{$email}?subject=Your%20{$comment->type}%20Comment\">{$email}</a>";
}
?>
  <div class="content">
   <table class="summary">
    <tr><th>Version:</th> <td><?php 
echo htmlentities($comment->version, ENT_QUOTES, "UTF-8");
?>
</td></tr>
예제 #2
0
파일: gsitemap.php 프로젝트: notzen/e107
    require_once HEADERF;
    $sql->db_Select("gsitemap", "*", "gsitemap_active IN (" . USERCLASS_LIST . ") ORDER BY gsitemap_order ");
    $nfArray = $sql->db_getList();
    $text = "<div style='text-align:left'><ul>";
    foreach ($nfArray as $nfa) {
        $url = substr($nfa['gsitemap_url'], 0, 4) == "http" ? $nfa['gsitemap_url'] : SITEURL . $tp->replaceConstants($nfa['gsitemap_url'], TRUE);
        $text .= "<li>" . $tp->toHTML($nfa['gsitemap_cat'], "", "defs") . ": <a href='" . $url . "'>" . $tp->toHTML($nfa['gsitemap_name'], "", "defs") . "</a></li>\n";
    }
    $text .= "</ul></div>";
    $ns->tablerender(SITENAME . " : " . GSLAN_Name . "", $text);
    require_once FOOTERF;
    exit;
}
$xml = "<?xml version='1.0' encoding='UTF-8'?>\n<urlset xmlns='http://www.google.com/schemas/sitemap/0.84'\nxmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'\txsi:schemaLocation='http://www.google.com/schemas/sitemap/0.84\nhttp://www.google.com/schemas/sitemap/0.84/sitemap.xsd'>";
$sql->db_Select("gsitemap", "*", "gsitemap_active IN (" . USERCLASS_LIST . ") ORDER BY gsitemap_order ");
$smArray = $sql->db_getList();
foreach ($smArray as $sm) {
    $loc = substr($sm['gsitemap_url'], 0, 4) == "http" ? $sm['gsitemap_url'] : SITEURL . $tp->replaceConstants($sm['gsitemap_url'], TRUE);
    $xml .= "\n\t<url>\n\t\t<loc>" . $loc . "</loc>\n\t\t<lastmod>" . get_iso_8601_date($sm['gsitemap_lastmod']) . "</lastmod>\n    \t\t<changefreq>" . $sm['gsitemap_freq'] . "</changefreq>\n    \t\t<priority>" . $sm['gsitemap_priority'] . "</priority>\n\t</url>";
}
$xml .= "\n</urlset>";
echo $xml;
/* ungu at terong dot com */
function get_iso_8601_date($int_date)
{
    $date_mod = date('Y-m-d\\TH:i:s', $int_date);
    $pre_timezone = date('O', $int_date);
    $time_zone = substr($pre_timezone, 0, 3) . ":" . substr($pre_timezone, 3, 2);
    $date_mod .= $time_zone;
    return $date_mod;
}
예제 #3
0
$email = isset($_POST['email']) ? $_POST['email'] : "";
/// FIXME: Check version, window and context??
if ($type != "Like" && $type != "Dislike" && $type != "Bug" && $type != "Feature") {
    die($likeBackReplyError);
}
/// From http://fr.php.net/manual/fr/function.date.php
/// @Param $int_date Current date in UNIX timestamp
function get_iso_8601_date($int_date)
{
    $date_mod = date('Y-m-d\\TH:i:s', $int_date);
    $pre_timezone = date('O', $int_date);
    $time_zone = substr($pre_timezone, 0, 3) . ":" . substr($pre_timezone, 3, 2);
    $date_mod .= $time_zone;
    return $date_mod;
}
db_query("INSERT INTO LikeBack(date, version, locale, window, context, type, status, comment, email) " . "VALUES('" . get_iso_8601_date(time()) . "', " . "'" . addslashes($version) . "', " . "'" . addslashes($locale) . "', " . "'" . addslashes($window) . "', " . "'" . addslashes($context) . "', " . "'" . addslashes($type) . "', " . "'New', " . "'" . addslashes($comment) . "', " . "'" . addslashes($email) . "')");
$id = db_insert_id();
$sendMailTo = "";
$data = db_query("SELECT * FROM LikeBackDevelopers WHERE email!=''");
while ($line = db_fetch_object($data)) {
    if (matchType($line->types, $type) && matchLocale($line->locales, $locale)) {
        $sendMailTo .= (empty($sendMailTo) ? "" : ", ") . $line->email;
    }
}
$serverPort = ":" . $_SERVER['SERVER_PORT'];
if ($serverPort == ":80") {
    $serverPort = "";
}
$path = $_SERVER['SCRIPT_NAME'];
$path = substr($path, 0, strrpos($path, "/") + 1);
$likeBackViewAddress = "http://" . $_SERVER['HTTP_HOST'] . $serverPort . $path . "admin/view.php";