Current time: 05-17-2024, 07:34 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 4 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[MOD] Автоустановка скриптов на панель
Author Message
beliy Offline
Junior Member
*

Posts: 125
Joined: Oct 2010
Reputation: 0
Post: #57
RE: [MOD] Автоустановка скриптов на панель
Нашол небольшой баг инсталера, вот скрин:

http://habreffect.ru/0d8/c73ad989e/si.png

сразу стало понятно что проблема с gui\client\hosting_plan_update.php

После сравнения с оригиналом, могу допустить что проблема кроется в
стороках:

оригинал (начиная с 379 строки):
Code:
            $link_purchase = '<a href="hosting_plan_update.php?'
                . $purchase_link.'='.$rs->fields['id']
                . '" class="linkdark">';

            if ($purchase_link == 'order_id' && count($error_msgs) > 0) {
                $link_purchase = tr('You cannot update to this hosting plan, see notices in text.');

                if (count($warning_msgs) > 0) {
                    $warning_text = '<br /><br /><strong>'.tr('Warning:').'</strong><br />'.implode('<br />', $warning_msgs);
                } else {
                    $warning_text = '';
                }
                $warning_text .= '<br /><br /><strong>'.tr('Caution:').'</strong><br />'.implode('<br />', $error_msgs);
            } elseif ($purchase_link == 'order_id' && count($warning_msgs) > 0) {
                $warning_text = '<br /><br /><strong>'.tr('Warning:').'</strong><br />'.implode('<br />', $warning_msgs);
                $link_purchase .= tr('I understand the warnings - Purchase!');
                $link_purchase .= '</a>';
            } else {
                $warning_text = '';
                $link_purchase .= '{TR_PURCHASE}</a>';
            }

            $tpl->assign(
                array(
                    'HP_NAME'            => tohtml($rs->fields['name']),
                    'HP_DESCRIPTION'    => tohtml($rs->fields['description']),
                    'HP_DETAILS'        => $details.$warning_text,
                    'HP_COSTS'            => tohtml($price),
                    'ID'                => $rs->fields['id'],
                    'TR_PURCHASE'        => $purchase_text,
                    'LINK'                => $purchase_link,
                    'TR_HOSTING_PLANS'    => $hp_title,
                    'ITHEM'                => ($i % 2 == 0) ? 'content' : 'content2',
                    'LINK_PURCHASE'        => $link_purchase
                )
            );

в измененном начиная с 397:

Code:
                if ($purchase_link == 'order_id' && count($error_msgs) > 0) {
                    $purchase_link = 'dummy';
                    $purchase_text = tr('You can not update to this hosting plan, see notices in text.');
                    if (count($warning_msgs) > 0) {
                        $warning_text = '<br /><br /><strong>'.tr('Warning:').'</strong><br />'.implode('<br />', $warning_msgs);
                    } else {
                        $warning_text = '';
                    }
                    $warning_text .= '<br /><br /><strong>'.tr('Caution:').'</strong><br />'.implode('<br />', $error_msgs);
                } elseif ($purchase_link == 'order_id' && count($warning_msgs) > 0) {
                    $warning_text = '<br /><br /><strong>'.tr('Warning:').'</strong><br />'.implode('<br />', $warning_msgs);
                    $purchase_text = tr('I understand the warnings - Purchase!');

                } else {
                    $warning_text = '';
                }
                $tpl->assign(
                        array(
                            'HP_NAME'            => stripslashes($rs->fields['name']),
                            'HP_DESCRIPTION'    => stripslashes($rs->fields['description']),
                            'HP_DETAILS'        => stripslashes($details).$warning_text,
                            'HP_COSTS'            => $price,


                            'ID'                => $rs->fields['id'],
                            'TR_PURCHASE'        => $purchase_text,
                            'LINK'                => $purchase_link,
                            'TR_HOSTING_PLANS'    => $hp_title,
                            'ITHEM'                => ($i % 2 == 0) ? 'content' : 'content2'

                        )
                );

Уважаемый fatalist не могли бы вы подправить столь неприятный момент...
(This post was last modified: 01-12-2011 11:30 PM by beliy.)
01-12-2011 11:09 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [MOD] Автоустановка скриптов на панель - beliy - 01-12-2011 11:09 PM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)