- 1
var options = [<?php echo implode(',', range(App\Service\Service::CONSTANT_MIN, App\Service\Service::CONSTANT_MAX)); ?>];
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 7
+4
var options = [<?php echo implode(',', range(App\Service\Service::CONSTANT_MIN, App\Service\Service::CONSTANT_MAX)); ?>];
+160
class WPEditableComments{
function WPEditableComments(){$this->__construct();}
Нашел в одном из плагинов wp. Чел думает об обратной совместимости ога
+155
$(element).width($(element).width());
$(element).height($(element).height());
Просто нет слов.
+151
<?php
class MainController extends ModuleAdminController {
public $defaultAction = 'admin';
public function actionCreate() {
$this->redirect('admin');
}
public function actionDelete($id) {
$this->redirect('admin');
}
public function actionView($id) {
$this->redirect('admin');
}
}
Модули в Yii такие коварные :(
+55
<option <? if(isset($_POST['day']) and $_POST['day']=="01") echo "selected"; ?> value="01">1</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="02") echo "selected"; ?> value="02">2</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="03") echo "selected"; ?> value="03">3</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="04") echo "selected"; ?> value="04">4</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="05") echo "selected"; ?> value="05">5</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="06") echo "selected"; ?> value="06">6</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="07") echo "selected"; ?> value="07">7</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="08") echo "selected"; ?> value="08">8</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="09") echo "selected"; ?> value="09">9</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="10") echo "selected"; ?> value="10">10</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="11") echo "selected"; ?> value="11">11</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="12") echo "selected"; ?> value="12">12</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="13") echo "selected"; ?> value="13">13</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="14") echo "selected"; ?> value="14">14</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="15") echo "selected"; ?> value="15">15</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="16") echo "selected"; ?> value="16">16</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="17") echo "selected"; ?> value="17">17</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="18") echo "selected"; ?> value="18">18</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="19") echo "selected"; ?> value="19">19</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="20") echo "selected"; ?> value="20">20</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="21") echo "selected"; ?> value="21">21</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="22") echo "selected"; ?> value="22">22</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="23") echo "selected"; ?> value="23">23</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="24") echo "selected"; ?> value="24">24</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="25") echo "selected"; ?> value="25">25</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="26") echo "selected"; ?> value="26">26</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="27") echo "selected"; ?> value="27">27</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="28") echo "selected"; ?> value="28">28</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="29") echo "selected"; ?> value="29">29</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="30") echo "selected"; ?> value="30">30</option>
<option <? if(isset($_POST['day']) and $_POST['day']=="31") echo "selected"; ?> value="31">31</option>
вЫводим дни в селекте )) А как ты выводишь дни в селекте? %)
+145
<?php
//O_o
echo dirname(__DIR__);
?>
+174
function viewCSS() {
header("Content-type: text/css");
echo "*, body {\n";
echo " margin: 0;\n";
echo " padding: 0;\n";
echo " position: static;\n";
echo " background: transparent;\n";
echo " color:#000;\n";
echo " font:100% \"Lucida Grande\", Arial, Helvetica, Verdana, sans-serif;\n";
echo " line-height:1.2em;\n";
echo "}\n";
echo "html, body {\n";
echo " height: 100%\n";
echo "}\n";
echo "#wrapper {\n";
echo " position:relative;\n";
echo " min-height:100%;\n";
echo " width: 760px;\n";
echo " margin: 0 auto -60px;\n";
echo " text-align:left;\n";
echo " border-left:1px black solid;\n";
echo " border-right:1px black solid;\n";
echo "}\n";
echo "#header {\n";
echo " background: #CCC url('/images/header.jpg') top center no-repeat;\n";
echo " margin:0 auto;\n";
echo " height:245px;\n";
echo " border-bottom:1px black solid;\n";
echo " overflow:none;\n";
echo " }\n";
echo "#navigation {\n";
echo " width:200px;\n";
echo " background:#fff;\n";
echo " float:right;\n";
echo " border:1px black solid;\n";
echo " padding:20px;\n";
echo " margin-top:20px;\n";
echo " margin-right:20px;\n";
echo " margin-left:20px;\n";
echo "}\n";
echo "#navigation ul {\n";
echo " list-style-type:none;\n";
echo "}\n";
echo " #tags,#recent_comments{\n";
echo " float:left;\n";
echo " margin-left:20px;\n";
echo " text-align:center;\n";
echo "}\n";
echo "#recent_comments a{\n";
echo " border-bottom:1px black dashed;\n";
echo "}\n";
echo "#recent_comments p{\n";
echo " font-size:80%;\n";
echo " line-height:1.4em;\n";
echo " margin-bottom:-5px;\n";
echo "}\n";
echo "#tags a{\n";
echo " text-decoration:none;\n";
echo "}\n";
echo "#tags span { padding:5px; float:left; }\n";
echo "#tags span.first a { color:#000; font-size:2.6em; }\n";
echo "#tags span.second a { color:#111; font-size:2.4em; }\n";
echo "#tags span.third a { color:#222; font-size:2.2em; }\n";
echo "#tags span.fourth a { color:#333; font-size:2em; }\n";
echo "#tags span.fifth a { color:#444; font-size:1.8em; }\n";
echo "#tags span.sixth a { color:#555; font-size:1.6em; }\n";
echo "#tags span.seventh a { color:#666; font-size:1.4em; }\n";
echo "#tags span.eighth a { color:#777; font-size:1.2em; }\n";
echo "#tags span.ninth a { color:#888; font-size:1em; }\n";
echo "#tags span.tenth a { color:#999; font-size:0.8em; }\n";
echo "p.post_preview_date {\n";
echo " font-style:italic;\n";
echo "}\n";
echo "#content {\n";
echo " text-align: justify;\n";
echo " padding-bottom:130px;\n";
echo "}\n";
echo "#footer {\n";
echo " position:relative;\n";
echo " margin:0 auto;\n";
echo " width:760px;\n";
echo " height:60px;\n";
echo " padding-top:30px;\n";
echo " background: #FFF url('/images/footer.jpg') top center no-repeat;\n";
echo " font-size:80%;\n";
echo " text-align:center;\n";
echo " line-height:0.7em;\n";
echo " border-top:1px black solid;\n";
echo "}\n";
echo "#footer a, #content a {\n";
echo " text-decoration:none;\n";
echo " color: #222;\n";
echo "}\n";
echo "#footer a:visited, #content a:visited {\n";
echo " color: #222;\n";
echo "}\n";
echo "#footer a:hover, #content a:hover {\n";
echo " color: #333;\n";
echo "}\n";
Ну как? :)