Ejemplo n.º 1
0
         $file_content .= '<td><b><a class="links" href="viewlogs.php?logid=' . htmlspecialchars($log_record['id'], ENT_COMPAT, 'UTF-8') . '" onmouseover="Tip(\'';
         // ukrywanie nicka autora komentarza COG
         // Łza
         if ($log_record['log_type'] == 12 && !$usr['admin']) {
             $log_record['user_name'] = tr('cog_user_name');
             $log_record['user_id'] = 0;
         }
         // koniec ukrywania nicka autora komentarza COG
         $file_content .= '<b>' . $log_record['user_name'] . '</b>: &nbsp;';
         if ($log_record['encrypt'] == 1 && $log_record['cache_owner'] != $usr['userid'] && $log_record['luser_id'] != $usr['userid']) {
             $file_content .= "<img src=\\'/tpl/stdstyle/images/free_icons/lock.png\\' alt=\\`\\` /><br/>";
         }
         if ($log_record['encrypt'] == 1 && ($log_record['cache_owner'] == $usr['userid'] || $log_record['luser_id'] == $usr['userid'])) {
             $file_content .= "<img src=\\'/tpl/stdstyle/images/free_icons/lock_open.png\\' alt=\\`\\` /><br/>";
         }
         $data = cleanup_text(str_replace("\r\n", " ", $log_record['log_text']));
         $data = str_replace("\n", " ", $data);
         if ($log_record['encrypt'] == 1 && $log_record['cache_owner'] != $usr['userid'] && $log_record['luser_id'] != $usr['userid']) {
             //crypt the log ROT13, but keep HTML-Tags and Entities
             $data = str_rot13_html($data);
         } else {
             $file_content .= "<br/>";
         }
         $file_content .= $data;
         $file_content .= '\', PADDING,5, WIDTH,280,SHADOW,true)" onmouseout="UnTip()">' . htmlspecialchars($log_record['cache_name'], ENT_COMPAT, 'UTF-8') . '</a></b></td>';
         $file_content .= '<td><b><a class="links" href="viewprofile.php?userid=' . htmlspecialchars($log_record['user_id'], ENT_COMPAT, 'UTF-8') . '">' . htmlspecialchars($log_record['user_name'], ENT_COMPAT, 'UTF-8') . '</a></b></td>';
         $file_content .= "</tr>";
     }
 }
 $pages = mb_ereg_replace('{last_img}', $last_img, $pages);
 $pages = mb_ereg_replace('{first_img}', $first_img, $pages);
Ejemplo n.º 2
0
function insert_blog($link, $blog, $title)
{
    $title = cleanup_text($title);
    $query = "insert into blogs(id,title) values({$blog},'{$title}')";
    mysqli_query($link, $query) or die(mysqli_error($link));
}
Ejemplo n.º 3
0
                    <br />
                    <a class='bkbtn' href='addurl.php' title='Go back to Suggest form'>".$sph_messages['BackToSubForm']."</a>                
                    </body>
                    </html>
                ";
                die ('');
            }       
            error_reporting(E_ALL);
            session_destroy();    
        }
        
		// 	clean input			
		$url 		= 	cleaninput(cleanup_text(trim(substr ($url, 0,100))));
		$title 		= 	cleaninput(cleanup_text(trim(substr ($title, 0,100))));
		$description = 	cleaninput(cleanup_text(nl2br(trim(substr ($description, 0,250)))));
		$email 		= 	cleaninput(cleanup_text(trim(substr ($email, 0,100))));
		
		//	check Url
		$input  = $url;        
		validate_url($input);
        $url = $input;
			
		//	check Title
		if(!preg_match('/^[[:print:]]{5,100}$/', $title)) {
            echo "<h1>$mytitle</h1><br />
                <p class='em cntr warnadmin'> 
                ".$sph_messages['InvTitle']."
                <br />               
                </p>
                <br />
                <a class='bkbtn' href='addurl.php' title='Go back to Suggest form'>".$sph_messages['BackToSubForm']."</a>                
Ejemplo n.º 4
0
<td>Password</td><td><input type="password" id="password" name="password" maxlength="32"></td>
</tr>
<tr>
<td><input type="submit" id="submit" value="Login"></td>
</tr>
</table>
</form>

<?php 
} else {
    ?>

<?php 
    $username = $_POST["username"];
    $password = $_POST["password"];
    $username = cleanup_text($username);
    $query = "select password in users where username = '******'";
    if (check_password($link, $username, $password)) {
        $userid = get_userid($link, $username);
        $_SESSION[$session] = $userid;
        echo "Logged in successfully!<br>";
    } else {
        if (username_existed($link, $username)) {
            die("Wrong password!");
        } else {
            die("Username does not exist!");
        }
    }
    ?>

<?php 
Ejemplo n.º 5
0
//      Enter here to restore URL files into database
if (isset($file) && $del == 0) {
    $file = "{$url_path}{$file}.txt";
    $short_desc = '';
    $title = '';
    $required = '';
    $disallowed = '';
    $can_leave_domain = '';
    $parent_num = "0";
    $theFile = file_get_contents($file);
    $lines = array();
    $lines = explode("\n", $theFile);
    echo "<br /><p class='alert'><span class='em'>\r\n            Starting to import:</p>\r\n        ";
    $num = '1';
    foreach ($lines as $new) {
        $new = cleanup_text(nl2br(trim(substr($new, 0, 150))));
        //echo "<br>NEW:<br><pre>";print_r($new);echo "</pre>";
        if (strlen($new) > 10) {
            $new = explode($delim, $new);
            $url = $new[0];
            $spider_depth = $new[1];
            if ($spider_depth == '') {
                $spider_depth = '-1';
            }
            $category = $new[2];
            if (strlen($spider_depth) > '2') {
                $category = $spider_depth;
            }
            if ($num & 1) {
                echo "\t<p class='odrow'>\n";
            } else {
Ejemplo n.º 6
0
function find_description($var)
{
    $matches = explode('<div class="field-item even">', $var);
    return cleanup_text($matches[1]);
}
Ejemplo n.º 7
0
     foreach ($newcaches as $statename => $state_record) {
         $cache_location = '<tr><td colspan="8" class="content-title-noshade-size1">' . htmlspecialchars($statename, ENT_COMPAT, 'UTF-8') . '</td></tr>';
         $content .= $cache_location;
         foreach ($state_record as $cache_record) {
             $file_content = '';
             $file_content .= '<tr>';
             $file_content .= '<td style="width: 90px;">' . date('d-m-Y', strtotime($cache_record['date'])) . '</td>';
             $file_content .= '<td width="22">&nbsp;<img src="tpl/stdstyle/images/' . getSmallCacheIcon($cache_record['icon_large']) . '" border="0" alt=""/></td>';
             $file_content .= '<td><b><a class="links" href="viewcache.php?cacheid=' . htmlspecialchars($cache_record['cache_id'], ENT_COMPAT, 'UTF-8') . '">' . htmlspecialchars($cache_record['name'], ENT_COMPAT, 'UTF-8') . '</a></b></td>';
             $file_content .= '<td width="32"><b><a class="links" href="viewprofile.php?userid=' . htmlspecialchars($cache_record['userid'], ENT_COMPAT, 'UTF-8') . '">' . htmlspecialchars($cache_record['username'], ENT_COMPAT, 'UTF-8') . '</a></b></td>';
             $rs_log = XDb::xSql("SELECT cache_logs.id, cache_logs.cache_id AS cache_id,\n                            cache_logs.text AS log_text, cache_logs.type AS log_type,\n                            cache_logs.date AS log_date, user.username AS user_name,\n                            cache_logs.user_id AS luser_id, user.user_id AS user_id,\n                            log_types.icon_small AS icon_small\n                    FROM (cache_logs INNER JOIN caches ON (caches.cache_id = cache_logs.cache_id))\n                        INNER JOIN user ON (cache_logs.user_id = user.user_id)\n                        INNER JOIN log_types ON (cache_logs.type = log_types.id)\n                    WHERE cache_logs.deleted=0 AND cache_logs.cache_id= ?\n                    GROUP BY cache_logs.id ORDER BY cache_logs.date_created DESC LIMIT 1", $cache_record['cache_id']);
             if ($r_log = XDb::xFetchArray($rs_log)) {
                 $file_content .= '<td style="width: 80px;">' . htmlspecialchars(date("d-m-Y", strtotime($r_log['log_date'])), ENT_COMPAT, 'UTF-8') . '</td>';
                 $file_content .= '<td width="22"><b><a class="links" href="viewlogs.php?logid=' . htmlspecialchars($r_log['id'], ENT_COMPAT, 'UTF-8') . '" onmouseover="Tip(\'';
                 $file_content .= '<b>' . $r_log['user_name'] . '</b>:&nbsp;';
                 $data = cleanup_text(str_replace("\r\n", " ", $r_log['log_text']));
                 $data = str_replace("\n", " ", $data);
                 $file_content .= $data;
                 $file_content .= '\',OFFSETY, 25, OFFSETX, -135, PADDING,5, WIDTH,280,SHADOW,true)" onmouseout="UnTip()"><img src="tpl/stdstyle/images/' . $r_log['icon_small'] . '" border="0" alt=""/></a></b></td>';
                 $file_content .= '<td>&nbsp;&nbsp;<b><a class="links" href="viewprofile.php?userid=' . htmlspecialchars($r_log['user_id'], ENT_COMPAT, 'UTF-8') . '">' . htmlspecialchars($r_log['user_name'], ENT_COMPAT, 'UTF-8') . '</a></b></td>';
             } else {
                 $file_content .= '<td style="width: 80px;">&nbsp;</td><td width="22">&nbsp;</td><td>&nbsp;</td>';
             }
             $file_content .= "</tr>";
             $content .= $file_content;
             XDb::xFreeResults($rs_log);
         }
     }
 }
 XDb::xFreeResults($rs);
 tpl_set_var('file_content', $content);
Ejemplo n.º 8
0
 function getPictures($cacheid, $picturescount)
 {
     global $thumb_max_width;
     global $thumb_max_height;
     $database = OcDb::instance();
     $s = $database->multiVariableQuery('SELECT uuid, title, url, spoiler FROM pictures
         WHERE object_id=:1 AND object_type=2 AND display=1
         ORDER BY date_created', $cacheid);
     $retval = '';
     while ($r = $database->dbResultFetch($s)) {
         $retval .= '&lt;img src="' . $r['url'] . '"&gt;&lt;br&gt;' . cleanup_text($r['title']) . '&lt;br&gt;';
     }
     return $retval;
 }
Ejemplo n.º 9
-1
function getPictures($cacheid, $picturescount)
{
    global $thumb_max_width;
    global $thumb_max_height;
    $rs = XDb::xSql('SELECT uuid, title, url, spoiler FROM pictures
            WHERE object_id= ? AND object_type=2 AND display=1
            ORDER BY date_created', $cacheid);
    if (!isset($retval)) {
        $retval = '';
    }
    while ($r = XDb::xFetchArray($rs)) {
        $retval .= '&lt;img src="' . $r['url'] . '"&gt;&lt;br&gt;' . cleanup_text($r['title']) . '&lt;br&gt;';
    }
    XDb::xFreeResults($rs);
    return $retval;
}