-
+158
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
<?
$thePrice = $iblockelem[ "PROPERTIES" ][ "PRICE" ][ "VALUE" ];
$thePrice_s = '';
if(strlen(trim($thePrice))>3)
{
$priceArray = str_split($thePrice);
$priceArray = array_reverse($priceArray);
for($i = 1; $i <= count($priceArray); $i++)
{
$thePrice_s.=$priceArray[$i-1];
if(($i%3)==0)
$thePrice_s.=' ';
}
$thePrice = str_split($thePrice_s);
}
echo rtrim(ltrim(implode(array_reverse($thePrice))))
?>
<?=number_format($thePrice,0,"."," ")?>
fon-neiman,
27 Сентября 2011
-
+170
- 1
- 2
- 3
- 4
- 5
- 6
public function getAvailabelWebsites() {
return $this->_w();
}
public function getAvailavelWebsites() {
return $this->_w();
}
Модуль LightCheckout для Magento за скромные $169.00 .
К сожалению, слово "available" так и не смогли написать правильно:)
Doglexx,
26 Сентября 2011
-
+162
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
if (is_dir($mainDir))
{
if ($dh = opendir($mainDir))
{
while (($file = readdir($dh)) !== false)
{
if ( ($file!='.') && ($file!='..') ) $regions.=$file.',';
}
closedir($dh);
}
}
$regions = substr($regions, 0, -1);
$arrRegions = explode(",", $regions);
сразу пихать в массив файлы не судьба! надо изврат с строками
Rubaka,
26 Сентября 2011
-
+164
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
$rsAnswers = CFormAnswer::GetList( $QUESTION_ID, $by="s_id", $order="desc", $arFilter, $is_filtered );
$z = 0;
while ($arAnswer = $rsAnswers->Fetch())
{
$z = 1;
}
if ($z == 1) {
Когда там накопилось 100500 элементов сайт ВНЕЗАПНО начал лагать...
Tairesh,
26 Сентября 2011
-
+154
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
<?php
$temp='Исходная строка';
$search='Поисковый запрос';
$result=str_ireplace($search, $temp);
if ($result!=$temp)return true;
else
return false;
?>
Вот так я проверял на наличие подстроки в строке! *ROFL*
QarezZ,
25 Сентября 2011
-
+166
- 1
- 2
- 3
- 4
- 5
<?php
$count = 0;
foreach($mainResult2 as $r) $count++;
if ($count > 0) echo '...';
?>
проверка не пустой ли массив(объект?).
increazon,
25 Сентября 2011
-
+164
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
<?php
include "dbconfig.php";
$db = mysql_connect("$dbhost","$dbuser","$dbpass");
mysql_select_db("$dbname",$db);
$mysqlsite = mysql_query("SELECT * FROM site WHERE id='1'");
$site = mysql_fetch_array($mysqlsite);
$titlesite = $site['title'];
$titlesite = iconv("CP1251", "UTF-8", "$titlesite");
$descriptionsite = $site['description'];
$descriptionsite = iconv("CP1251", "UTF-8", "$descriptionsite");
$keywordssite = $site['keywords'];
$keywordssite = iconv("CP1251", "UTF-8", "$keywordssite");
$contsite = $site['cont'];
$contsite = iconv("CP1251", "UTF-8", "$contsite");
?>
"CMS" Хостинг провайдера ultrahost.com.ua D
SaNcHeS,
24 Сентября 2011
-
+151
- 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
- 60
- 61
<?php include ("blocks/bd.php");
if (isset($_POST['author']))
{
$author = $_POST['author'];
}
if (isset($_POST['tetx']))
{
$text = $_POST['text'];
}
if (isset($_POST['pr']))
{
$pr = $_POST['pr'];
}
if (isset($_POST['sub_com']))
{
$sub_com = $_POST['sub_com'];
}
if (isset($_POST['id']))
{
$id = $_POST['id'];
}
if (isset($sub_com))
{
if (isset($author)) {trim($author); }
else {$author = "";}
if (isset($text)) {trim($text); }
else {$text = "";}
if (empty($author) or empty($text))
{
exit ("<p>Вы ввели не всю информацию ,вернитесь назад и заполните все поля. <br> <input name='back' type='button' value='Вернитесь назад'onclick='javascript:self.back();'>");
}
$author = stripslashes($author);
$text = stripslashes($text);
$author = htmlspecialchars($author);
$text = htmlspecialchars($text);
$result = mysql_query ("SELECT sum FROM com_settings",$db);
$myrow = mysql_fetch_array($result);
if ($pr == $myrow["sum"])
{
$date = date("Y-m-d");
$result2 = mysql_query ("INSERT INTO comments (post,author,text,date) VALUES ('$id','$author','$text','$date')",$db);
}
else
{
exit ("<p>Вы ввели не вернуюсумму цыфр с картинки на пебедущей странице. <br> <input name='back' type='button' value='Вернитесь назад'onclick='javascript:self.back();'>");
}
}
?>
мне тут надо post прировнть к id чтобы коментарий добивился в то место где надо
в 54 строке мне выдет вот такую ошибку:
Notice: Undefined variable: id in z:\home\localhost\www\phpblog\comment.ph p on line 54
скажипо пож что тут справить
cooler97,
24 Сентября 2011
-
+162
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
# Если ошибка при авторизации
begin_page("Вход");
echo("<font color='red'>Ошибка при наборе логина или пароля</font>\n");
}
# Форма авторизации
if (!headers_sent())
begin_page("Вход");
Поручили мне отрефакторить систему "Компьютерный класс" и баги в ней пофиксить.
В login.php сразу же гениальнейшая конструкция.
7ion,
23 Сентября 2011
-
+161
- 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
- 60
if (!GetCurrentCurrency()) { print $_lang[ErrorGetCurrentCurrency]; mclose(); exit; }
@set_time_limit(0);
$company_name=GetSetting('company_name');
$company_url=GetSetting('company_url');
$billing_url=GetSetting('billing_url');
$support_url=GetSetting('support_url');
$manager_email=GetSetting('manager_email');
$cronAutoSuspend = GetSetting('cronAutoSuspend');
$cronSendAdminEndOrder = GetSetting('cronSendAdminEndOrder');
$cronSendClientBillRemind = GetSetting('cronSendClientBillRemind');
$cronSendClientBillRemindDays = GetSetting('cronSendClientBillRemindDays');
$cronSendClientEndOrderRemind = GetSetting('cronSendClientEndOrderRemind');
$cronSendClientEndOrderRemindDays = GetSetting('cronSendClientEndOrderRemindDays');
$cronSendClientEndOrderDomainRemind = GetSetting('cronSendClientEndOrderDomainRemind');
$cronSendClientEndOrderDomainRemindDays = GetSetting('cronSendClientEndOrderDomainRemindDays');
$cronDeleteBill = GetSetting('cronDeleteBill');
$cronDeleteBillDay = GetSetting('cronDeleteBillDay');
$cronDeleteNeobrabOrdersWithoutBills = GetSetting('cronDeleteNeobrabOrdersWithoutBills');
$cronDeleteNeobrabOrdersDomainsWithoutBills = GetSetting('cronDeleteNeobrabOrdersDomainsWithoutBills');
$cronDeleteOrder = GetSetting('cronDeleteOrder');
$cronDeleteOrderDay = GetSetting('cronDeleteOrderDay');
$cronAutoDelete = GetSetting('cronAutoDelete');
$cronDeleteOrderDomain = GetSetting('cronDeleteOrderDomain');
$cronDeleteOrderDomainDay = GetSetting('cronDeleteOrderDomainDay');
$cronCloseTickets = GetSetting('cronCloseTickets');
$cronCloseTicketsDay = GetSetting('cronCloseTicketsDay');
$cronDeleteTickets = GetSetting('cronDeleteTickets');
$cronDeleteTicketsDay = GetSetting('cronDeleteTicketsDay');
$cronDeleteUserLogs = GetSetting('cronDeleteUserLogs');
$cronDeleteUserLogsDay = GetSetting('cronDeleteUserLogsDay');
$cronDeleteAdminLogs = GetSetting('cronDeleteAdminLogs');
$cronDeleteAdminLogsDay = GetSetting('cronDeleteAdminLogsDay');
$cronSendClientEndOrderShopRemind = GetSetting('cronSendClientEndOrderShopRemind');
$cronSendClientEndOrderShopRemindDays = GetSetting('cronSendClientEndOrderShopRemindDays');
$cronDeleteNeobrabOrdersShopWithoutBills = GetSetting('cronDeleteNeobrabOrdersShopWithoutBills');
$cronDeleteOrderShop = GetSetting('cronDeleteOrderShop');
$cronDeleteOrderShopDay = GetSetting('cronDeleteOrderShopDay');
$cronSendClientEndTestRemind = GetSetting('cronSendClientEndTestRemind');
$cronSendClientEndTestRemindDays = GetSetting('cronSendClientEndTestRemindDays');
$autoRenewEnable=GetSetting("autoRenewEnable");
$autoRenewClientChange=GetSetting("autoRenewClientChange");
$autoRenewDay=GetSetting("autoRenewDay");
$autoRenewDomainDay=GetSetting("autoRenewDomainDay");
$autoRenewShopDay=GetSetting("autoRenewShopDay");
$attachPDFtoBill = GetSetting("attachPDFtoBill");
$cronSendClientEndTestRemind = GetSetting('cronSendClientEndTestRemind');
$cronSendClientEndTestRemindDays = GetSetting('cronSendClientEndTestRemindDays');
$cronAutoDeleteTest = GetSetting('cronAutoDeleteTest');
if ($cronCloseTickets and intval($cronCloseTicketsDay) > 0) {
и так дальше с каждой переменной ~ 1500 строк кода
Равшан,где сериализация?
Где сериализация кодя я тебя спашиваю?!
- Где сериализация, насяльника, где?
tertychniy,
23 Сентября 2011