Ignore:
Timestamp:
10/23/07 14:49:17 (5 years ago)
Author:
hverton
Message:

Made the locales unique for this module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/common/advertising/php-files/modules/advertising/advertising_admin.php

    r997 r999  
    8686                                die('copy failed!'); 
    8787                            } else { 
    88                                 $errormessage = sprintf($locale['920'], $user_from['user_name'], $user_to['user_name']); 
     88                                $errormessage = sprintf($locale['ads920'], $user_from['user_name'], $user_to['user_name']); 
    8989                                $action = "list"; 
    9090                            } 
    9191                        } 
    9292                    } else { 
    93                         $errormessage = $locale['921']; // ad not found in the database 
     93                        $errormessage = $locale['ads921'];  // ad not found in the database 
    9494                    } 
    9595                } else { 
    96                     $errormessage = $locale['922']; // invalid advert_id passed in the POST 
     96                    $errormessage = $locale['ads922'];  // invalid advert_id passed in the POST 
    9797                } 
    9898            } else { 
    99                 $errormessage = $locale['923']; // client ID not found in the database 
     99                $errormessage = $locale['ads923'];  // client ID not found in the database 
    100100            } 
    101101        } else { 
    102             $errormessage = $locale['924']; // invalid client ID passed in the POST 
     102            $errormessage = $locale['ads924'];  // invalid client ID passed in the POST 
    103103        } 
    104104    } else { 
    105         $errormessage = $locale['923']; // client ID not found in the database 
     105        $errormessage = $locale['ads923'];  // client ID not found in the database 
    106106    } 
    107107} 
     
    144144            $adverts_sold = $_POST['adverts_sold']; 
    145145            if (!isNum($_POST['adverts_purchased'])) { 
    146                 $errormessage .= $locale['903']."<br />"; 
     146                $errormessage .= $locale['ads903']."<br />"; 
    147147            } else { 
    148148                $adverts_sold = $adverts_sold + ($_POST['change']=="-"?-1:1) * $_POST['adverts_purchased']; 
    149149                if ($adverts_sold < 0) { 
    150                     $errormessage .= $locale['904']."<br />"; 
     150                    $errormessage .= $locale['ads904']."<br />"; 
    151151                } 
    152152            } 
     
    163163                $maxsize = explode("x", $ad_dimensions[$adverts_location]); 
    164164                if ($dimensions[0] > $maxsize[0] || $dimensions[1] > $maxsize[1]) { 
    165                     $errormessage = sprintf($locale['912'], $ad_dimensions[$adverts_location], $dimensions[0]."x".$dimensions[1]); 
     165                    $errormessage = sprintf($locale['ads912'], $ad_dimensions[$adverts_location], $dimensions[0]."x".$dimensions[1]); 
    166166                } 
    167167            } 
     
    173173                            VALUES ('".$adverts_userid."', '".$adverts_contract."', '".$adverts_contract_start."', '".$adverts_contract_end."', '".$adverts_priority."', '".$adverts_location."', '".$adverts_url."', '".$adverts_sold."', '".$adverts_image."', '".$adverts_status."')"); 
    174174                        $adverts_id = mysql_insert_id(); 
    175                         $errormessage = $locale['906']; 
     175                        $errormessage = $locale['ads906']; 
    176176                        break; 
    177177                    case "edit": 
     
    179179                            adverts_priority = '".$adverts_priority."', adverts_location = '".$adverts_location."', adverts_url = '".$adverts_url."', adverts_sold = '".$adverts_sold."', adverts_image = '".$adverts_image."', adverts_status = '".$adverts_status."' 
    180180                            WHERE adverts_id = '".$adverts_id."'"); 
    181                         $errormessage = $locale['907']; 
     181                        $errormessage = $locale['ads907']; 
    182182                        break; 
    183183                    default: 
     
    191191                $action = "list";    
    192192            } else { 
    193                 $errortitle = $locale['900']; 
     193                $errortitle = $locale['ads900']; 
    194194            } 
    195195    } 
     
    207207        $imgtemp = $_FILES['myfile']['tmp_name']; 
    208208        if (!in_array($imgext, $image_types)) { 
    209             $errormessage = $locale['960']; 
     209            $errormessage = $locale['ads960']; 
    210210        } elseif (is_uploaded_file($imgtemp)){ 
    211211            if (@getimagesize($imgtemp) && @verify_image($imgtemp)) { 
     
    221221                chmod($destfile,0664); 
    222222            } else { 
    223                 $errormessage = $locale['961']; 
     223                $errormessage = $locale['ads961']; 
    224224            } 
    225225        } else { 
    226             $errormessage = $locale['962']; 
     226            $errormessage = $locale['ads962']; 
    227227        } 
    228228        // save the action to be able to reload the form data later 
     
    270270            } 
    271271 
    272             $errortitle = $locale['476']; 
    273             $errormessage = $locale['910']; 
     272            $errortitle = $locale['ads476']; 
     273            $errormessage = $locale['ads910']; 
    274274        } 
    275275    } 
     
    279279if ($action == "enable") { 
    280280    $result = dbquery("UPDATE ".$db_prefix."advertising SET adverts_status = '1' WHERE adverts_id = '".$adverts_id."'"); 
    281     $errormessage = sprintf($locale['913'], $adverts_id); 
     281    $errormessage = sprintf($locale['ads913'], $adverts_id); 
    282282    $action = "list"; 
    283283} 
    284284if ($action == "disable") { 
    285285    $result = dbquery("UPDATE ".$db_prefix."advertising SET adverts_status = '0' WHERE adverts_id = '".$adverts_id."'"); 
    286     $errormessage = sprintf($locale['914'], $adverts_id); 
     286    $errormessage = sprintf($locale['ads914'], $adverts_id); 
    287287    $action = "list"; 
    288288} 
     
    291291switch ($action) { 
    292292    case "delclient": 
    293         $title = $locale['476']; 
     293        $title = $locale['ads476']; 
    294294        $result = dbquery("SELECT user_name FROM ".$db_prefix."users WHERE user_id = '$id'"); 
    295295        if ($data = dbarray($result)) { 
     
    304304        $result = dbquery("UPDATE ".$db_prefix."advertising SET adverts_status = '0' WHERE adverts_image = '".$image."'"); 
    305305        unlink(PATH_IMAGES_ADS.$image); 
    306         $errormessage = $locale['971']; 
     306        $errormessage = $locale['ads971']; 
    307307        $action = "images"; 
    308308        break; 
     
    310310        break; 
    311311    case "addad": 
    312         $title = $locale['400']; 
     312        $title = $locale['ads400']; 
    313313        $result = dbquery("SELECT user_name FROM ".$db_prefix."users WHERE user_id = '$id'"); 
    314314        if ($data = dbarray($result)) { 
    315             $title .= $locale['408']."<b>".$data['user_name']."</b>"; 
     315            $title .= $locale['ads408']."<b>".$data['user_name']."</b>"; 
    316316            $ad_client = $data['user_name']; 
    317317            $ad_client_id = $id; 
     
    336336        break; 
    337337    case "add": 
    338         $title = $locale['447']; 
     338        $title = $locale['ads447']; 
    339339        break; 
    340340    case "edit": 
    341         $title = $locale['401']; 
     341        $title = $locale['ads401']; 
    342342        $result = dbquery("SELECT * FROM ".$db_prefix."advertising WHERE adverts_id = '$adverts_id'"); 
    343343        if (dbrows($result) == 0) { 
    344             $errormessage = $locale['901']; 
     344            $errormessage = $locale['ads901']; 
    345345        } else { 
    346346            // initialise variables 
     
    384384            $result = dbquery("SELECT user_name FROM ".$db_prefix."users WHERE user_id = '$adverts_userid'"); 
    385385            if ($data = dbarray($result)) { 
    386                 $title .= $locale['408']."<b>".$data['user_name']."</b>"; 
     386                $title .= $locale['ads408']."<b>".$data['user_name']."</b>"; 
    387387                $ad_client = $data['user_name']; 
    388388                $ad_client_id = $adverts_userid; 
     
    394394        $result = dbquery("SELECT * FROM ".$db_prefix."advertising WHERE adverts_id = '$adverts_id'"); 
    395395        if (dbrows($result) == 0) { 
    396             $errortitle = $locale['900']; 
    397             $errormessage = $locale['901']; 
     396            $errortitle = $locale['ads900']; 
     397            $errormessage = $locale['ads901']; 
    398398        } else { 
    399399            $result = dbquery("DELETE FROM ".$db_prefix."advertising WHERE adverts_id = '$adverts_id'"); 
    400             $errormessage = $locale['902']; 
     400            $errormessage = $locale['ads902']; 
    401401        } 
    402402        $action = "list"; 
     
    419419        $adverts_expired = $_POST['adverts_expired']; 
    420420        $action = $action_save; 
    421         $title = $action =="add"?$locale['400']:$locale['401']; 
    422         $title .= $locale['408']."<b>".$ad_client."</b>"; 
     421        $title = $action =="add"?$locale['ads400']:$locale['ads401']; 
     422        $title .= $locale['ads408']."<b>".$ad_client."</b>"; 
    423423        $ad_client_id = $id; 
    424424        break; 
     
    433433    case "delclient": 
    434434        $variables['id'] = $id; 
    435         $variables['question'] = sprintf($locale['909'], $ad_client); 
     435        $variables['question'] = sprintf($locale['ads909'], $ad_client); 
    436436        if (isset($errormessage)) { 
    437437            $variables['errormessage'] = $errormessage; 
     
    591591                    case 1: 
    592592                        if ($data2['adverts_contract_start'] > time()) { 
    593                             $contract_type .= " (".$locale['472']." ".showdate("%d-%m-%Y", $data2['adverts_contract_start']).")"; 
     593                            $contract_type .= " (".$locale['ads472']." ".showdate("%d-%m-%Y", $data2['adverts_contract_start']).")"; 
    594594                        } elseif ($data2['adverts_contract_end'] != 0) { 
    595                             $contract_type .= " (".$locale['471']." ".showdate("%d-%m-%Y", $data2['adverts_contract_end']).")"; 
     595                            $contract_type .= " (".$locale['ads471']." ".showdate("%d-%m-%Y", $data2['adverts_contract_end']).")"; 
    596596                        } 
    597597                        break; 
    598598                    case 2: 
    599                         $contract_type .= " (".($data2['adverts_sold']-$data2['adverts_shown'])." ".$locale['477'].")"; 
     599                        $contract_type .= " (".($data2['adverts_sold']-$data2['adverts_shown'])." ".$locale['ads477'].")"; 
    600600                        break; 
    601601                } 
     
    621621                    case 1: 
    622622                        if ($data2['adverts_contract_start'] > time()) { 
    623                             $contract_type .= " (".$locale['472']." ".showdate("%d-%m-%Y", $data2['adverts_contract_start']).")"; 
     623                            $contract_type .= " (".$locale['ads472']." ".showdate("%d-%m-%Y", $data2['adverts_contract_start']).")"; 
    624624                        } elseif ($data2['adverts_contract_end'] != 0) { 
    625                             $contract_type .= " (".$locale['471']." ".showdate("%d-%m-%Y", $data2['adverts_contract_end']).")"; 
     625                            $contract_type .= " (".$locale['ads471']." ".showdate("%d-%m-%Y", $data2['adverts_contract_end']).")"; 
    626626                        } 
    627627                        break; 
    628628                    case 2: 
    629                         $contract_type .= " (".($data2['adverts_sold']-$data2['adverts_shown'])." ".$locale['477'].")"; 
     629                        $contract_type .= " (".($data2['adverts_sold']-$data2['adverts_shown'])." ".$locale['ads477'].")"; 
    630630                        break; 
    631631                } 
Note: See TracChangeset for help on using the changeset viewer.