示例#1
0
             } else {
                 $tpl['submitcataloghistory']['error'][] = "Пользователь, отредактировавший поле не имеет право голоса";
             }
         }
     }
 }
 $tpl['catalognew']['show']['is_shopcoinssubbscribe'] = false;
 $tpl['catalognew']['show']['is_catalognewmycatalog'] = false;
 if ($tpl['user']['user_id']) {
     $rows_shopcoinssubbscribe = $catalognew_class->getMyCatalogshopcoinssubscribeItem($tpl['user']['user_id'], $catalog);
     if ($rows_shopcoinssubbscribe) {
         $tpl['catalognew']['show']['is_shopcoinssubbscribe'] = true;
         $tpl['catalognew']['show']['shopcoinssubbscribe'] = $rows_shopcoinssubbscribe["amount"] > 1 ? $rows_shopcoinssubbscribe["amount"] : 1;
         $tpl['catalognew']['show']['shopcoinssubbscribedate'] = $rows_shopcoinssubbscribe["dateinsert"];
     }
     $rows_catalognewmycatalog = $catalognew_class->getCatalognewmycatalogItem($tpl['user']['user_id'], $catalog);
     if ($rows_catalognewmycatalog) {
         $tpl['catalognew']['show']['is_catalognewmycatalog'] = true;
         $tpl['catalognew']['show']['catalognewmycatalog'] = $catalognewmycatalog[$rows_shopcoinssubbscribe["catalog"]] = $rows_catalognewmycatalog["catalognewmycatalog"];
     }
 }
 $tpl['catalognew']['show']['can_edit'] = false;
 if ($rows_main["agreement"] == 0) {
     $tpl['catalognew']['show']['rows_agreement_catalog'] = $catalognew_class->getAgreementCatalog($catalog);
 } elseif ($materialtype != 3) {
     $tpl['catalognew']['show']['can_edit'] = true;
 }
 if ($rows_main["theme"] > 0) {
     $strtheme = decbin($rows_main["theme"]);
     $strthemelen = strlen($strtheme);
     $chars = preg_split('//', $strtheme, -1, PREG_SPLIT_NO_EMPTY);