+164        
        
                            - 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 
                        public function deletePubs() {
        $id = $this->core->request->parameters["id"];
        if (!empty($id)) {
        	$id++; $id--;
            $this->core->database->exec(
            "delete
		FROM lists
		WHERE id=".$id
            );
        }
        header("Location: /admin/about/listAbout");
    }
                                     
        
            Не знаю что автор хотел сделал кодом на 4-ой строке. Предполагаю, что таким образом он приводит переменную $id к целочисленному типу.
        
        
            
 alxkolm,
            15 Декабря 2011
        
        
        
            
        
        
                +164        
        
                            - 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 - 13
 - 14
 - 15
 - 16
 - 17
 - 18
 - 19
 - 20
 - 21
 - 22
 - 23
 - 24
 - 25
 - 26
 - 27
 - 28
 - 29
 - 30
 - 31
 - 32
 - 33
 - 34
 - 35
 - 36
 - 37
 - 38
 - 39
 - 40
 - 41
 - 42
 - 43
 - 44
 - 45
 - 46
 - 47
 - 48
 - 49
 - 50
 - 51
 - 52
 - 53
 - 54
 - 55
 - 56
 - 57
 - 58
 - 59
 
                        class PAGING
{
  var $sql,$records,$pages;
  var $page_no,$total,$limit,$first,$previous,$next,$last,$start,$end;
  function PAGING($sql,$records=9,$pages=5)
  {   global $mysqli;
    if($pages%2==0) $pages++;
    $res = $mysqli->query($sql);
    $sqlquery++;
    $total=mysqli_num_rows($res);
    $page_no=isset($_GET["p"])?$_GET["p"]:1;
    $limit=($page_no-1)*$records;
    $sql.=" limit $limit,$records";
    $first=1;
    $previous=$page_no>1?$page_no-1:1;
    $next=$page_no+1;
    $last=ceil($total/$records);
    if($next>$last)
      $next=$last;
    $start=$page_no;
    $end=$start+$pages-1;
    if($end>$last)
      $end=$last;
    if(($end-$start+1)<$pages)
    {
      $start-=$pages-($end-$start+1);
      if($start<1)
        $start=1;
    }
    if(($end-$start+1)==$pages)
    {
      $start=$page_no-floor($pages/2);
      $end=$page_no+floor($pages/2);
      while($start<$first)
      {
        $start++;
        $end++;
      }
      while($end>$last)
      {
        $start--;
        $end--;
      }
    }
    $this->sql=$sql;
    $this->records=$records;
    $this->pages=$pages;
    $this->page_no=$page_no;
    $this->total=$total;
    $this->limit=$limit;
    $this->first=$first;
    $this->previous=$previous;
    $this->next=$next;
    $this->last=$last;
    $this->start=$start;
    $this->end=$end;
  }
  function show_paging($url,$params=""){...}
}
                                     
        
            Вот так вот товарищ пейджинг организует ООО)
        
        
            
 aleXoid,
            13 Декабря 2011
        
        
        
            
        
        
                +164        
        
                            - 1
 - 2
 - 3
 - 4
 
                        $sql = "SELECT (max(nid) + 1) FROM cms_news";
$MySQL_baza->ExecQuery($sql);
$myrow=$MySQL_baza->FetchArray();
$max=$myrow[0];
                                     
        
            Копался в одном старом проекте, не сразу понял зачем нужен следующий код.
Автоинкримент %)
        
        
            
 MAXHO,
            02 Декабря 2011
        
        
        
            
        
        
                +164        
        
                            - 1
 - 2
 - 3
 
                        if (!isset ($_POST['filter']['state'])) $_POST['filter']['state'] = 0;
.....
$state = @$_POST['filter']['state'] ? $_POST['filter']['state'] : 0;
                                     
        
            не, ну а вдруг потеряется
        
        
            
 CRRaD,
            30 Ноября 2011
        
        
        
            
        
        
                +164        
        
                            - 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 
                        <p></a></p>
<p><a href="http://domikrent.com/nedvizhimost/arenda/arenda-vip-ofisa-ul-r-okipnoj4-a.htm#more-153" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','domikrent.com']);"> </a></p>
<p><a href="http://domikrent.com/nedvizhimost/arenda/arenda-vip-ofisa-ul-r-okipnoj4-a.htm#more-153" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','domikrent.com']);"></a></p>
<p><a href="http://domikrent.com/nedvizhimost/arenda/arenda-vip-ofisa-ul-r-okipnoj4-a.htm#more-153" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','domikrent.com']);"> </a></p>
<p><a href="http://domikrent.com/nedvizhimost/arenda/arenda-vip-ofisa-ul-r-okipnoj4-a.htm#more-153" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','domikrent.com']);"></a></p>
<p><a href="http://domikrent.com/nedvizhimost/arenda/arenda-vip-ofisa-ul-r-okipnoj4-a.htm#more-153" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','domikrent.com']);"> </a></p>
<p><a href="http://domikrent.com/nedvizhimost/arenda/arenda-vip-ofisa-ul-r-okipnoj4-a.htm#more-153" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','domikrent.com']);"></a></p>
<p>Сдам офисное помещение,  5 кв.м., ст. м «Левобережная», н/ф, цоколь,   евроремонт (ламинат,обои под покраску),  кондиционирование, телефон  (телесистемы),  интернет, услуги секретаря.<strong> Цена включая аренду + коммунальные + э.э.-  1200 грн/мес;</strong></p>
<p>Сдаю свое, без комиссионных!</p>
<p><a href="http://domikrent.com/nedvizhimost/arenda/arenda-vip-ofisa-ul-r-okipnoj4-a.htm#more-153" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','domikrent.com']);"></a></p>
                                     
        
            И еще сотня строк
Коротко об авторе - Знание ПК:
Знание языков программирования: pascal, Delphi 7, C++, C#, Assembler, java, php, javascript, ajax, jQuery, css, htm, flexl; ЗнаниеСУБД: mySQl, MsSQL, Oracl; Знания библиотек distributed computing: MPI, Win32; Знания серверов: Apache 2, Tomcat; ОС: Windows, Unix; Паттерны проектирования; MVC;
Умения администрировать Unix системы. Навыки в настройке: Bind9, POP3 SMTP IMAP – servers, Apache PHP MySQL5, NFS –server, OSPF or RIP servers, DHCP, configuration Unix Firewalls.
Завтра будем собеседовать....
        
        
            
 kyzi007,
            22 Ноября 2011
        
        
        
            
        
        
                +164        
        
                            - 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 
                        ...
// description
if( $group_row['description'] == "" )
	$this->options["description"]=(int)false; // Можно было просто писать 0
else {
	$this->description = $group_row['description'];
	$this->options["description"]=(int)true; // Можно было просто писать 1))
}
...
$this->privancy['photos'] = (int)(bool)$group_row['photos'];
$this->privancy['topics'] = (int)(bool)$group_row['topics'];
...
                                     
        
            Вчера ночью вот что написал :) Надо мне работать только днём!)
        
        
            
 m_hamlet,
            11 Ноября 2011
        
        
        
            
        
        
                +164        
        
                            - 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 - 13
 - 14
 - 15
 - 16
 - 17
 - 18
 - 19
 
                        /*
common.php file
*/
// FeedBack form
if(is_file('include/FeedBack.php'))
    require_once 'include/FeedBack.php';
else if(is_file('../include/FeedBack.php'))
    require_once '../include/FeedBack.php';
else
    Error('Не удается подключить модуль: include/FeedBack.php');
// Monitoring of page loading time
if(is_file('include/Monitoring.php'))
    require_once 'include/Monitoring.php';
else if(is_file('../include/Monitoring.php'))
    require_once '../include/Monitoring.php';
else
    Error('Не удается подключить модуль: include/Monitoring.php');
                                     
        
            Инклудим в инклудах.
        
        
            
 psrustik,
            07 Ноября 2011
        
        
        
            
        
        
                +164        
        
                            - 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 
                        if (
	$arItem["DEPTH_LEVEL"]==$previousLevel
	&&$arItem["IS_PARENT"]
	&&$arItem["DEPTH_LEVEL"]>3
	||$arItem["DEPTH_LEVEL"]<$previousLevel
	&&$arItem["IS_PARENT"]
	&&$arItem["DEPTH_LEVEL"]==3
	&&$previousLevel-$arItem["DEPTH_LEVEL"]==1
) 
.....
                                     
        
            Paranoid mode deteсted! Внимание! (Г)Код был в строку, для удобства чтения отформатировал.
        
        
            
 ProfBiss,
            01 Ноября 2011
        
        
        
            
        
        
                +164        
        
                            - 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 - 13
 
                        function GetDopNumbersArray($array)
{
				$i=0;
		foreach ($array as $phone)
				{
					if($phone=="-")
					{
						$i++;}else
						{
					$dop_phones_arr[$i][]=$phone;}
				}
		return $dop_phones_arr;
}
                                     
        
            Самый чудный способ расставления скобочек.
        
        
            
 alexxxnf,
            31 Октября 2011
        
        
        
            
        
        
                +164        
        
                            - 1
 - 2
 
                        var exists = eval(model.get('posting').exists);
if ( typeof(exists) == "undefined" ) exists = true;
                                     
        
            ужос
        
        
            
 marg,
            19 Октября 2011