$xml_output .= '</wp:author>';
//Site versiyon bilgisi
$xml_output .= '<generator>';
$xml_output .= 'http://wordpress.org/?v=4.3.1';
$xml_output .= '</generator>';
//İçerik alanı
$query = "SELECT * from haber  where uid=0 and haberonay=1 order by tarih limit 2328,100";
$result = mysql_query($query);
if ($result) {
    // echo "here*******************";
    $imgcount = 18589;
    $row_w = 0;
    if (mysql_num_rows($result) > 0) {
        while ($row = mysql_fetch_array($result)) {
            //print_r( $row); exit;
            $url = replaceSpace($row['baslik']);
            $xml_output .= '<item>';
            // Haber başlık
            $xml_output .= '<title>';
            $xml_output .= $row['baslik'];
            $xml_output .= '</title>';
            //Haber link
            $xml_output .= '<link>';
            $xml_output .= 'http://kamilklkn.com' . $url;
            $xml_output .= '</link>';
            //Haber tarih
            $xml_output .= '<pubDate>';
            $xml_output .= date("m/d/y g:i A", strtotime($row['tarih']));
            $xml_output .= '</pubDate>';
            /*
             * Haber yazar getir başla
Exemple #2
0
}
function replaceSpace($string)
{
    $string = str_replace(' ', '.', $string);
    return $string;
}
?>
<form method="post" action="?form=ok">
    Nom : <input type="text" name="name" /><br/>
    Pic name : <input type="text" name="pic" /><br/>
    <input type="submit" />
</form>
<?php 
if (isset($_GET['form'])) {
    $insert = $database->prepare('INSERT INTO map (name, pic) values(:name, :pic)');
    $insert->execute(array('name' => replaceSpace($_POST['name']), 'pic' => $_POST['pic']));
}
$select = $database->prepare('SELECT * FROM map');
$select->execute();
while ($data = $select->fetch()) {
    ?>
    <div>
        <strong><?php 
    echo $data['name'];
    ?>
</strong><br/>
        <img src="../files/pic/map/<?php 
    echo $data['pic'];
    ?>
" alt="<?php 
    echo $data['pic'];
    $len1 = strlen($str1);
    //Actual string
    $len2 = strlen($str2);
    //Replace character string
    if ($len1 == 0 || $len2 == 0) {
        return $str1;
    }
    $totalNoOfSpace = 0;
    //finding space
    for ($start = 0; $start < $len1; $start++) {
        if ($str1[$start] == ' ') {
            $totalNoOfSpace++;
        }
    }
    $newLen = $len1 + ($len2 - 1) * $totalNoOfSpace - 1;
    $str3 = $str1;
    $oldend = strlen($str1) - 1;
    for ($newend = $newLen; $newend >= 0;) {
        if ($str1[$oldend] == ' ') {
            for ($rend = $len2 - 1; $rend >= 0; $rend--) {
                $str3[$newend--] = $str2[$rend];
            }
        } else {
            $str3[$newend--] = $str1[$oldend];
        }
        $oldend--;
    }
    return $str3;
}
echo replaceSpace(" Hri shike sh ", '%20');
Exemple #4
0
             if ($row['status'] == '1') {
                 $status = 'Published';
             } else {
                 $status = 'Draft';
             }
             $comments = '';
             if ($row['no_comments'] == 0) {
                 $comments = 'No comments';
             } elseif ($row['no_comments'] == 1) {
                 $comments = $row['no_comments'] . ' comment';
             } else {
                 $comments = $row['no_comments'] . ' comments';
             }
             $formatDate = formatDate($row['date']);
             $linkName = replaceSpace($row['Name']);
             $linkTitle = replaceSpace($row['postTitle']);
             $latest_blog = '<div class="media"><div class="pull-left">';
             $latest_blog .= '<img src="' . $row['img'] . '" alt="' . $row['postTitle'] . '" height=64></div>';
             $latest_blog .= '<div class="media-body"><span class="media-heading postTitle ajaxd" data-id=' . $row['id'] . '><a href="#/' . $linkName . '/' . $linkTitle . '">' . $row['postTitle'] . '</a></span>';
             $latest_blog .= '<small class="muted">Posted ' . $formatDate . '</small></div></div>';
             $mysql_data[] = array("blog_view" => $latest_blog);
         }
     }
 } elseif ($job == 'single_blog') {
     if ($id == '') {
         $result = 'error';
         $message = 'id missing';
     } else {
         $query = "SELECT * FROM post_view WHERE id = '" . mysqli_real_escape_string($con, $id) . "'";
         $single_post = mysqli_query($con, $query);
         if (!$single_post) {