- 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
function preDispatch() {
// Validate and redirect
try {
$this->_DB = Zend_Db_Table::getDefaultAdapter();
$time = $this->_DB->query('SELECT time FROM `CapturesList` WHERE InnerLink = \'' . $_SERVER['REQUEST_URI'] . '\' LIMIT 0,1;')->fetchAll();
@$this->view->time = $time[0]['time'];
if ($time[0]['time'] != NULL) {
$times = split(', ', $time[0]['time']);
if (strtotime(($times[1]) . '/' . ($times[2]) . '/' . $times[0] . ' ' . $times[3] . ":00") < (int) (mktime())) {
if (strtotime(($times[1]) . '/' . ($times[2]) . '/' . $times[0] . ' ' . $times[3] . ":00") > 1347032555) {
$count = $this->_DB->query('SELECT *, COUNT(time) AS counts FROM `CapturesList` WHERE time IS NOT NULL;')->fetchAll();
$count = $count[0]['counts'];
@$newdate = strftime("%G, %m, %d, %H", strtotime(($times[1]) . '/' . ($times[2]) . '/' . $times[0] . ' ' . $times[3] . ":00 +" . ((int)($count / 2) + 1) . " weeks"));
@$this->_DB->query('UPDATE `CapturesList` SET `time` = \'' . ($newdate) . '\' WHERE InnerLink = \'' . $_SERVER['REQUEST_URI'] . '\';');
@$this->view->time = $newdate;
}
else{@$this->view->time = $time[0]['time'];}
} else {
@$this->view->time = $time[0]['time'];
}
} else {
@$this->view->time = "NULL";
}
} catch (Exception $exc) {
echo $exc->getTraceAsString();
@$this->view->time = "NULL";
}
header('Refer: ' . $this->view->linktofunnel);
if (session_id() == '')
session_start();
if ($this->_getParam('action') != 'save') {
$_SESSION["domain"] = $this->view->domain;
$_SESSION["owner"] = $this->OwnerData;
}
}
Более говнокодного я давно не писал. Кажется я схожу с ума
scriptin 06.12.2012 18:57 # +4
eth0 06.12.2012 20:38 # +3
Интересно, можно ли давать оценку качества проекта на ПХП с помощью незатейливого `grep @`?
scriptin 06.12.2012 21:30 # 0
Fai 06.12.2012 21:42 # +1
Опять PHP, гад, все языки обошел!
bormandinho 01.08.2021 15:16 # 0
Sh1tM4ker 08.12.2012 08:50 # 0
Что это?
inkanus-gray 08.12.2012 09:20 # +4
bormand 08.12.2012 10:26 # +6
inkanus-gray 08.12.2012 10:56 # 0
bormand 08.12.2012 11:25 # +3
guest 08.12.2012 16:48 # +1
cook это варщик и отнюдь не борща
LispGovno 08.12.2012 16:50 # +1
guest 08.12.2012 17:06 # −1
bormandinho 01.08.2021 15:17 # 0
bormandinho 01.08.2021 15:19 # 0
JloJle4Ka 02.08.2021 06:55 # 0
https://m.vk.com/video51590065_456239712