Overview

Packages

  • None
  • PHPShopAjaxElements
  • PHPShopAjaxElementsDepricated
  • PHPShopArray
  • PHPShopClass
    • Helper
  • PHPShopCore
  • PHPShopCoreDepricated
  • PHPShopCoreFunction
  • PHPShopDepricated
  • PHPShopElements
  • PHPShopElementsDepricated
  • PHPShopGUI
  • PHPShopInc
  • PHPShopObj
  • PHPShopParser
  • PHPShopShopCore
  • PHPShopTest

Classes

  • AjaxNotice
  • AjaxPricemail
  • AjaxReview
  • fase4_rdf
  • inwords
  • PHPShop404
  • PHPShopAdminRule
  • PHPShopAnalitica
  • PHPShopArray
  • PHPShopBannerElement
  • PHPShopBase
  • PHPShopBaseXml
  • PHPShopBonus
  • PHPShopBrandsElement
  • PHPShopCart
  • PHPShopCartElement
  • PHPShopCategory
  • PHPShopCategoryArray
  • PHPShopClients
  • PHPShopCloudElement
  • PHPShopCommerceML
  • PHPShopCompanyArray
  • PHPShopCompare
  • PHPShopCore
  • PHPShopCoreElement
  • PHPShopCoretest
  • PHPShopCssParser
  • PHPShopCurrencyElement
  • PHPShopDate
  • PHPShopDebug
  • PHPShopDelivery
  • PHPShopDeliveryArray
  • PHPShopDoc
  • PHPShopDone
  • PHPShopElements
  • PHPShopError
  • PHPShopExcel
  • PHPShopFail
  • PHPShopFile
  • PHPShopForma
  • PHPShopFrontInterface
  • PHPShopGbook
  • PHPShopGbookElement
  • PHPShopGUI
  • PHPShopIndex
  • PHPShopInterface
  • PHPShopLang
  • PHPShopLinks
  • PHPShopMail
  • PHPShopMailFile
  • PHPShopMap
  • PHPShopMath
  • PHPShopModules
  • PHPShopNav
  • PHPShopNewprice
  • PHPShopNews
  • PHPShopNewsElement
  • PHPShopNewtip
  • PHPShopObj
  • PHPShopOpros
  • PHPShopOprosElement
  • PHPShopOrder
  • PHPShopOrderDelivery
  • PHPShopOrderFunction
  • PHPShopOrderStatusArray
  • PHPShopOrm
  • PHPShopPage
  • PHPShopPageCatalogElement
  • PHPShopPageCategory
  • PHPShopPageCategoryArray
  • PHPShopPages
  • PHPShopParentNameArray
  • PHPShopParser
  • PHPShopPayment
  • PHPShopPaymentArray
  • PHPShopPaymentResult
  • PHPShopPhoto
  • PHPShopPhotoCategory
  • PHPShopPhotoCategoryArray
  • PHPShopPhotoElement
  • PHPShopPrice
  • PHPShopPricemail
  • PHPShopPrint
  • PHPShopProduct
  • PHPShopProductArray
  • PHPShopProductElements
  • PHPShopProductFunction
  • PHPShopProductIconElements
  • PHPShopProductIndexElements
  • PHPShopPromotions
  • PHPShopPush
  • PHPShopReadCsvNative
  • PHPShopRecaptchaElement
  • PHPShopRestore
  • PHPShopRssParser
  • PHPShopSearch
  • PHPShopSecurity
  • PHPShopSelection
  • PHPShopSelectioncat
  • PHPShopShop
  • PHPShopShopCatalogElement
  • PHPShopShopCore
  • PHPShopSkinElement
  • PHPShopSliderElement
  • PHPShopSort
  • PHPShopSortAjax
  • PHPShopSortArray
  • PHPShopSortCategoryArray
  • PHPShopSortElement
  • PHPShopSortSearch
  • PHPShopSpec
  • PHPShopString
  • PHPShopSuccess
  • PHPShopSystem
  • PHPShopTemplates
  • PHPShopText
  • PHPShopTextElement
  • PHPShopUnsubscribe
  • PHPShopUpdate
  • PHPShopUser
  • PHPShopUserElement
  • PHPShopUserFunction
  • PHPShopUsers
  • PHPShopUserStatus
  • PHPShopUserStatusArray
  • PHPShopValuta
  • PHPShopValutaArray
  • rateForComment
  • XMLparser

Functions

  • __
  • __hide
  • _e
  • action_order_info
  • allowedFunctions
  • array2iconv
  • avg_rate
  • calendar
  • catalog_meta
  • CheckCanGzip
  • comment_rate
  • debug
  • delivery
  • DispComment
  • evalstr
  • GetDeliveryPrice
  • getExcelInfoUid
  • GetFile
  • getFotoIconPodrobno
  • getfullname
  • getgoodname
  • getLicense
  • GetVoteValue
  • getYandexSearchSql
  • GzDocOut
  • image_gallery
  • import
  • json_encode
  • json_fix_cyr
  • json_fix_utf
  • mailcartforma
  • makeCalendar
  • message_activation
  • message_register_success
  • MessageList
  • moname
  • Nav_comment
  • Nav_messages
  • notice_add
  • notice_list
  • notice_mail
  • NumFrom
  • option_check
  • option_select
  • option_select_add
  • order_list
  • ordercartforma
  • Page_comment
  • Page_messages
  • parse_ini_file_true
  • parseDatabase
  • Parser
  • ParseTemplate
  • ParseTemplateReturn
  • PHPShopAutoLoadClass
  • phpshopparserevalstr
  • preExtractCallBack
  • product_meta
  • query_filter
  • query_multibase
  • rating
  • ratingshort
  • ratingtop
  • readDatabase
  • returnSmile
  • search_base
  • set_meta
  • setAutokeyword
  • ShowStars
  • ShowStars2
  • sort_table
  • sorttemplateexample
  • stripslashes_deep
  • SysValueReturn
  • timer
  • tmpGetFile
  • user_message
  • usercartforma
  • userdeleveryforma
  • userfiles
  • userorderdoclink
  • userorderfiles
  • userorderpaymentlink
  • utf8_win1251
  • writeLangFile
  • xml2array
  • Overview
  • Package
  • Class
  • Tree
  1:   2:   3:   4:   5:   6:   7:   8:   9:  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:  62:  63:  64:  65:  66:  67:  68:  69:  70:  71:  72:  73:  74:  75:  76:  77:  78:  79:  80:  81:  82:  83:  84:  85:  86:  87:  88:  89:  90:  91:  92:  93:  94:  95:  96:  97:  98:  99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: 201: 202: 203: 204: 205: 206: 207: 208: 209: 210: 211: 212: 213: 214: 215: 216: 217: 218: 219: 220: 221: 222: 223: 224: 225: 226: 227: 228: 229: 230: 231: 232: 233: 234: 235: 236: 237: 238: 239: 240: 241: 242: 243: 244: 245: 246: 247: 248: 249: 250: 251: 252: 253: 254: 255: 256: 257: 258: 259: 260: 261: 262: 263: 264: 265: 266: 267: 268: 269: 270: 271: 272: 273: 274: 275: 276: 277: 278: 279: 280: 281: 282: 283: 284: 285: 286: 287: 288: 289: 290: 291: 292: 293: 294: 295: 296: 297: 298: 299: 300: 301: 302: 303: 304: 305: 306: 307: 308: 309: 310: 311: 312: 313: 314: 315: 316: 317: 318: 319: 320: 321: 322: 323: 324: 325: 326: 327: 328: 329: 330: 331: 332: 333: 334: 335: 336: 337: 338: 339: 340: 341: 342: 343: 344: 345: 346: 347: 348: 349: 350: 351: 352: 353: 354: 355: 356: 357: 358: 359: 360: 361: 362: 363: 364: 365: 366: 367: 368: 369: 370: 371: 372: 373: 374: 375: 376: 377: 378: 379: 380: 381: 382: 383: 384: 385: 386: 387: 388: 389: 390: 391: 392: 393: 394: 395: 396: 397: 398: 399: 400: 401: 402: 403: 404: 405: 406: 407: 408: 409: 410: 411: 412: 413: 414: 415: 416: 417: 418: 419: 420: 421: 422: 423: 424: 425: 426: 427: 428: 429: 430: 431: 432: 433: 434: 435: 436: 437: 438: 439: 440: 441: 442: 443: 444: 445: 446: 447: 448: 449: 450: 451: 452: 453: 454: 455: 456: 457: 458: 459: 460: 461: 462: 463: 464: 465: 466: 467: 468: 469: 470: 471: 472: 473: 474: 475: 476: 477: 478: 479: 480: 481: 482: 483: 484: 485: 486: 487: 488: 489: 
<?php

/**

 * @version 1.5
 * @package PHPShopClass
 * @subpackage Helper
 */
class PHPShopText {

    /**


     * @return string
     */
    static function nbsp($n = 1) {
        $i = 0;
        $nbsp = null;
        while ($i < $n) {
            $nbsp.='&nbsp;';
            $i++;
        }
        return $nbsp;
    }

    /**



     * @return string
     */
    static function b($string, $style = false) {
        return '<b style="' . $style . '">' . $string . '</b>';
    }

    /**




     * @return string
     */
    static function notice($string, $icon = false, $size = false) {
        if (!empty($icon))
            $img = PHPShopText::img($icon);
        else
            $img = null;

        if (!empty($size))
            $size = 'font-size:' . $size;
        else
            $size = null;

        return $img . '<h3 style="' . $size . '">' . $string . '</h3>';
    }

    /**





     * @return string
     */
    static function message($string, $icon = false, $size = false, $color = false, $class = false) {
        if (!empty($icon))
            $img = PHPShopText::img($icon);
        else
            $img = null;
        return $img . '<span style="color:' . $color . ';font-size:' . $size . '" class="' . $class . '">' . $string . '</span>';
    }

    /**





     * @return string
     */
    static function img($src, $hspace = 5, $align = 'left', $css = null) {
        return '<img src="' . $src . '" hspace="' . $hspace . '" align="' . $align . '" border="0" style="' . $css . '">';
    }

    /**

     * @return string
     */
    static function br() {
        return '<br>';
    }

    /**








     * @param string $option data-option
     * @return string
     */
    static function a($href, $text, $title = false, $color = false, $size = false, $target = false, $class = false, $option = false) {

        if ($size)
            $style.='font-size:' . $size . 'px;';
        if ($color)
            $style.='color:' . $color;
        if (empty($title))
            $title = $text;

        if ($title)
            $title = ' title="' . str_replace('"', "", $title) . '" ';
        if ($target)
            $target = ' target="' . $target . '" ';
        if ($class)
            $class = ' class="' . $class . '" ';
        if ($style)
            $style = ' style="' . $style . '" ';
        if ($option)
            $option = ' data-option="' . $option . '" ';

        return '<a href="' . $href . '"' . $title . $target . $class . $style . $option . '>' . $text . '</a>';
    }

    /**


     * @return string
     */
    static function slide($name) {
        return '<a name="' . $name . '"></a>';
    }

    /**


     * @param string $class css
     * @return string
     */
    static function h1($string, $class = false) {
        return '<h1 class="' . $class . '">' . $string . '</h1>';
    }

    /**


     * @param string $class css
     * @return string
     */
    static function h2($string, $class = false) {
        return '<h2 class="' . $class . '">' . $string . '</h2>';
    }

    /**


     * @param string $class css
     * @return string
     */
    static function h3($string, $class = false) {
        return '<h3 class="' . $class . '">' . $string . '</h3>';
    }

    /**


     * @param string $class class
     * @return string
     */
    static function h4($string, $class = false) {
        return '<h4 class="' . $class . '">' . $string . '</h4>';
    }

    /**


     * @param string $class css
     * @return string
     */
    static function ul($string, $class = 'list-group') {
        return '<ul class="' . $class . '">' . $string . '</ul>';
    }

    /**



     * @return string
     */
    static function ol($string, $type = null) {
        return '<ol type="' . $type . '">' . $string . '</ol>';
    }

    /**



     * @param string $class css
     * @return string
     */
    static function li($string, $href = null, $class = "list-group-item") {
        if (!empty($href)) {
            $text = PHPShopText::a($href, $string);
            $li = '<li class="' . $class . '">' . $text . '</li>';
        }
        else
            $li = '<li class="' . $class . '">' . $string . '</li>';
        return $li;
    }

    /**

     * @return string
     */
    static function tr() {
        $Arg = func_get_args();
        $tr = '<tr class="tablerow">';
        foreach ($Arg as $val) {
            $tr.=PHPShopText::td($val, 'tablerow');
        }
        $tr.='</tr>';
        return $tr;
    }

    /**

     * <code>
     * // example:


     * PHPShopText::select('my',$value,100);
     * </code>



     * @param string $float float




     * @param string $id CSS ID
     * @param string $class CSS class
     * @return string
     */
    static function select($name, $value, $width, $float = "none", $caption = false, $onchange = "return true", $height = false, $size = 1, $id = false, $class = "form-control selectpicker show-menu-arrow") {

        if (empty($id))
            $id = $name;

        if ($name)
            $name = ' name="' . $name . '"';

        if ($id)
            $id = ' id="' . $id . '"';

        if ($size)
            $size = ' size="' . $size . '"';

        if ($onchange)
            $onchange = ' onchange="' . $onchange . '"';

        if ($class)
            $class = ' class="' . $class . '"';


        $select = $caption . ' <select' . $name . $id . $size . ' style="float:' . $float . ';width:' . $width . 'px;height:' . $height . 'px"' . $onchange . $class . '>';
        if (is_array($value))
            foreach ($value as $val)
                $select.='<option value="' . $val[1] . '" ' . @$val[2] . '>' . $val[0] . '</option>';
        $select.='</select>';
        return $select;
    }

    /**





     * @return string
     */
    static function td($string, $class = false, $colspan = false, $id = false) {
        if ($class)
            $class = ' class="' . $class . '"';
        if ($id)
            $id = ' id="' . $id . '"';
        if ($colspan)
            $colspan = ' colspan="' . $colspan . '"';

        return '<td' . $class . $id . $colspan . '>' . $string . '</td>';
    }

    /**


     * @return string
     */
    static function th($string) {
        return '<th>' . $string . '</th>';
    }

    /**






     * @return string
     */
    static function div($string, $align = "left", $style = false, $id = false, $class = false) {
        if (empty($id))
            $id = time();
        if (empty($class))
            $class = __CLASS__ . '-' . __FUNCTION__;
        return '<div  id="' . $id . '" style="text-align:' . $align . ';' . $style . '" class="' . $class . '">' . $string . '</div>';
    }

    /**



     * @return string
     */
    static function strike($string, $format = 0) {

        //
        if (strstr($string, " ")) {
            $string_array = explode(" ", $string);
            return '<span style="text-decoration: line-through">' . number_format($string_array[0], $format, '.', ' ') . '</span> <span class="rubznak">' . $string_array[1] . '</span>';
        }
        else
            return '<span style="text-decoration: line-through">' . $string . '</span>';
    }

    /**


     * @return string
     */
    static function comment($type = '<') {
        if ($type == '<')
            return '<!--';
        else
            return '-->';
    }

    /**




     * @return string
     */
    static function p($string = '<br>', $style = false, $class = false) {
        if (empty($style))
            $style = __CLASS__ . '-' . __FUNCTION__;
        return '<p style="' . $style . '" class="' . $class . '">' . $string . '</p>';
    }

    /**




     * @return string
     */
    static function button($value, $onclick, $class = 'ok', $id = false) {

        if ($value)
            $value = ' value="' . $value . '"';

        if ($id)
            $id = ' id="' . $id . '"';

        if ($class)
            $class = ' class="' . $class . '"';

        if ($onclick)
            $onclick = ' onclick="' . $onclick . '"';

        return '<input type="button"' . $value . $onclick . $class . $id . '>';
    }

    /**


     * @param string $cellpadding cellpadding
     * @param string $cellspacing cellspacing




     * @param string $id id
     * @param string $class class
     * @return string
     */
    static function table($content, $cellpadding = 3, $cellspacing = 1, $align = 'center', $width = '100%', $bgcolor = false, $border = 0, $id = false, $class = false) {
        if ($cellpadding)
            $cellpadding = ' cellpadding="' . $cellpadding . '"';
        if ($cellspacing)
            $cellspacing = ' cellspacing="' . $cellspacing . '"';
        if ($align)
            $align = 'text-align:' . $align . ';';
        if ($width)
            $width = 'width:' . $width . ';';
        if ($bgcolor)
            $bgcolor = 'background:' . $bgcolor . ';';
        if ($border)
            $border = 'border:' . $border . 'px;';
        if ($id)
            $id = ' id="' . $id . '"';
        if ($class)
            $class = ' class="' . $class . '"';

        $style = ' style="' . $align . $width . $bgcolor . $border . '"';

        return '<table ' . $id . $style . $class . '>' . $content . '</table>';
    }

    /**






     * @return string
     */
    static function form($content, $name, $method = 'post', $action = '', $target = '_self') {
        return '<form action="' . $action . '" target="' . $target . '" name="' . $name . '" id="' . $name . '" method="' . $method . '">' . $content . '</form>';
    }

    /**
     * Input



     * @param int $float float






     * @return string
     */
    static function setInput($type, $name, $value, $float = "none", $size = 200, $onclick = "return true", $class = false, $caption = false, $description = false, $data = false, $requared = false) {

        if (!empty($onclick))
            $onclick = 'onclick="' . $onclick . '"';

        if (!empty($data))
            $data = 'data-option="' . $data . '"';

        $input = ' <input type="' . $type . '" value="' . $value . '" name="' . $name . '" id="' . $name . '" ' . $onclick . ' ' . $data . ' ' . $requared . '> ';

        if ($type != 'hidden')
            $input = '<div style="float:' . $float . '" class="' . $class . '">
             <label>' . $caption . $input . $description . '</label></div>';

        return $input;
    }

    /**






     * @param string $float  float

     * @return string
     */
    static function setInputText($caption, $name, $value, $size = 300, $description = false, $float = "none", $class = false) {
        return PHPShopText::setInput('text', $name, $value, $float, $size, false, $class, $caption, $description);
    }

    static function alert($content, $class = 'warning') {
        return '<div class="alert alert-' . $class . '" role="alert">' . $content . '</div>';
    }

}

?>
PHPShop 6.X API documentation generated by ApiGen