- 1
- 2
$time_now=date('d');
$tomorrow =date('d')+'1';
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+170
$time_now=date('d');
$tomorrow =date('d')+'1';
Кого-то ожидает 32 декабря.
+159
foreach (array(167, 163) as $low_rise_apartment_id)
{
$arParams["SEARCH_DATA"]["articletype"][] = $low_rise_apartment_id;
}
$arParams["SEARCH_DATA"]["articletype"] = array_unique($arParams["SEARCH_DATA"]["articletype"]);
+154
<?php if( !empty($documents[4]) ):?>
<hr>
<h3>Выполняемые работы</h3>
<table class="b-transparent-table">
<?php foreach ($documents[4] as $file_name => $text): ?>
<tr>
<td class ="td_big">
<h6><?= $text;?></h6>
</td>
<td>
<a href="<?= $dir.$passport['reforma_id'].DIRECTORY_SEPARATOR."4".DIRECTORY_SEPARATOR.$file_name;?>">скачать</a>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php endif;?>
магический документ 4. В файле откуда взят код есть также документ 5.
+153
/*рыба*/
$render['variables']['winter_complite'] = array(
'Жилищный фонд' =>100
,'Котельные' =>100
,'Тепловые сети' =>100
,'Водопроводные сети' =>100
,'Канализационные сети' =>100
,'Создание запасов топлива' =>100
);
reformat me!
+155
mail("[email protected]", "Тема письма", "Текст письма");
Заметка из цикла "О вреде копипаста".
Коллега попросил разобраться, отчего почта не приходит. Пять лет программирования на PHP, говорил он, когда устраивался к нам в контору... Вопрос один: как его вообще на работу взяли?..
+159
function verifyType($type){
switch ($type){
case 'cs':
$this->serverType = $type;
require_once $this->serverType.'Inc.php';
break;
case 'css':
$this->serverType = $type;
require_once $this->serverType.'Inc.php';
break;
case 'cssold':
$this->serverType = $type;
require_once $this->serverType.'Inc.php';
break;
case 'samp':
$this->serverType = $type;
require_once $this->serverType.'Inc.php';
break;
default:
Error::add('Ошибка', 'Тип сервера указан неверно!');
}
}
Очередной высер чудо-программистов. Еще одна панель управления игровыми серверами
+160
if($course==1) $max_semester = 2;
if($course==2) $max_semester = 4;
if($course==3) $max_semester = 6;
if($course==4) $max_semester = 8;
+164
$gender = ($gender == NCL::$MAN ?
"сдал" : "сдала");
+158
if($mark['data']){
switch ($mark['data']->point) {
case '0':
$table.= "незачет";
break;
case '1':
$table.= "зачет";
break;
case '2':
$table.= "неудовлетворительно";
break;
case '3':
$table.= "удовлетворительно";
break;
case '4':
$table.= "хорошо";
break;
case '5':
$table.= "отлично";
break;
default:
$table.= "";
break;
}
}else{
$table.= "";
}
+158
$table = "<w:tbl>";
$table .='<w:tblPr>
<w:tblW w:w="0" w:type="auto"/>
<w:jc w:val="center"/>
<w:tblBorders>
<w:top w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:left w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:bottom w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:right w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:insideH w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:insideV w:val="single" w:sz="4" w:space="0" w:color="auto"/>
</w:tblBorders>
<w:tblLook w:val="04A0" w:firstRow="1" w:lastRow="0" w:firstColumn="1" w:lastColumn="0" w:noHBand="0" w:noVBand="1"/>
</w:tblPr>';
$table .= "<w:tblGrid>
<w:gridCol w:w='800'/>
<w:gridCol w:w='3700'/>
<w:gridCol w:w='2000'/>
<w:gridCol w:w='1757'/>
<w:gridCol w:w='1000'/>
<w:gridCol w:w='1000'/>
</w:tblGrid>";
$table .= "<w:tr>";
$table .='
<w:trPr>
<w:jc w:val="center"/>
</w:trPr>
';
$table .= "<w:tc>";
$table .= "<w:p w14:paraId='22B64392' w14:textId='77777777' w:rsidR='00D55405' w:rsidRPr='003D674F' w:rsidRDefault='003D674F' w:rsidP='00D55405'>
<w:pPr>
<w:rPr>
<w:sz w:val='24'/>
<w:szCs w:val='24'/>
</w:rPr>
</w:pPr>
<w:r w:rsidRPr='003D674F'>
<w:rPr>
<w:sz w:val='24'/>
<w:szCs w:val='24'/>
</w:rPr>";
$table .= "<w:t>";
$table .= "№ п/п";
$table .= "</w:t></w:r></w:p></w:tc>";
$table .= "<w:tc>";
$table.="<w:p w14:paraId='22B64392' w14:textId='77777777' w:rsidR='00D55405' w:rsidRPr='003D674F' w:rsidRDefault='003D674F' w:rsidP='00D55405'>
<w:pPr>
<w:cantSplit/>
<w:rPr>
<w:sz w:val='24'/>
<w:szCs w:val='24'/>
</w:rPr>
</w:pPr>
<w:r w:rsidRPr='003D674F'>
<w:rPr>
<w:sz w:val='24'/>
<w:szCs w:val='24'/>
</w:rPr><w:t>";
$table .= "Фамилия, И.О. студента";
$table .= "</w:t></w:r></w:p></w:tc>";
$table .= "<w:tc>";
$table.="<w:p w14:paraId='22B64392' w14:textId='77777777' w:rsidR='00D55405' w:rsidRPr='003D674F' w:rsidRDefault='003D674F' w:rsidP='00D55405'>
<w:pPr>
<w:rPr>
<w:sz w:val='24'/>
<w:szCs w:val='24'/>
</w:rPr>
</w:pPr>
<w:r w:rsidRPr='003D674F'>
<w:rPr>
<w:sz w:val='24'/>
<w:szCs w:val='24'/>
</w:rPr><w:t>";
$table .= "Номер билета";
$table .= "</w:t></w:r></w:p></w:tc>";
$table .= "<w:tc>";
$table.="<w:p w14:paraId='22B64392' w14:textId='77777777' w:rsidR='00D55405' w:rsidRPr='003D674F' w:rsidRDefault='003D674F' w:rsidP='00D55405'>
<w:pPr>
<w:rPr>
<w:sz w:val='24'/>
<w:szCs w:val='24'/>
</w:rPr>
</w:pPr>
<w:r w:rsidRPr='003D674F'>
<w:rPr>
<w:sz w:val='24'/>
<w:szCs w:val='24'/>
</w:rPr><w:t>";
$table .= "Оценка* прописью";
$table .= "</w:t></w:r></w:p></w:tc>";
$table .= "<w:tc>";
$table.="<w:p w14:paraId='22B64392' w14:textId='77777777' w:rsidR='00D55405' w:rsidRPr='003D674F' w:rsidRDefault='003D674F' w:rsidP='00D55405'>
<w:pPr>
<w:rPr>
// ... over200 LOC
Это контроллер, чтоб вы знали...