当前位置: 首页>>代码示例>>PHP>>正文


PHP Helper::t方法代码示例

本文整理汇总了PHP中Helper::t方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper::t方法的具体用法?PHP Helper::t怎么用?PHP Helper::t使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Helper的用法示例。


在下文中一共展示了Helper::t方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Helper

 function edit_article_validation()
 {
     global $edit_article_validation;
     $helper_obj = new Helper();
     $output = "<script>\$(document).ready(function(){\n                        \$('#edit_video').validate(\n                        {\n                          'rules': " . json_encode($edit_article_validation) . ",\n                          'messages':{\n                              'title_updated' :{\n                                'required': '" . $helper_obj->t('This field is required') . "'        \n                              },\n                               'description_updated' :{\n                                'required': '" . $helper_obj->t('This field is required') . "'     \n                              },\n                               'edit_category' :{\n                                'required': '" . $helper_obj->t('This field is required') . "'        \n                              },\n                              'edit_pgrate' :{\n                                'required': '" . $helper_obj->t('This field is required') . "'        \n                              },\n                          }\n                        }); \n                     });</script>";
     return $output;
 }
开发者ID:arh922,项目名称:ain,代码行数:7,代码来源:validation_js.php

示例2: DbFunctions

 function build_edit_pgrate_popup($pgrate_id)
 {
     $db_functions_obj = new DbFunctions();
     $helper_obj = new Helper();
     $pgrate_info = $db_functions_obj->get_pgrate_by_id($pgrate_id);
     global $base_path;
     $output = "<script>\$(document).ready(function() {  \n                        \$('#edit_pgrate').ajaxForm(function(res) { \n                        var isvalid = \$(\"#edit_pgrate\").valid();\n                        if (isvalid) { \n                            var data = res.split(\"***#***\");   \n                            \$('#pgrate_' + data[1]).after(data[0]);\n                            \$('#pgrate_' + data[1]).remove(); \n                            closePopup();\n                        }  \n                    }); });</script>";
     $output .= "<div class='popup-header'>" . $helper_obj->t("Edit PG rate") . " " . $pgrate_info['name'] . "</div>";
     $output .= "<form class='form-horizontal form-validate form-vertical form-bordered' name='edit_pgrate' id='edit_pgrate' method='post' action='{$base_path}" . "edit_pgrate'>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>PG rate Name</label>\n                        <div class='controls'>\n                           <input class='input-xlarge' data-rule-required='true' data-rule-minlength='2' value='" . $pgrate_info['name'] . "' type='text' id='pgrate_name_update' name='pgrate_name_update' placeholder='" . $helper_obj->t("Name") . "'>\n                        </div>\n                     </div>";
     $output .= "";
     $output .= "<input class='btn btn-primary' type='submit' value='" . $helper_obj->t("Save") . "'>";
     $output .= "<input type='hidden' name='pgrate_id_updated' value='" . $pgrate_info['id'] . "'>";
     $output .= "</form>";
     return $output;
 }
开发者ID:arh922,项目名称:ain,代码行数:16,代码来源:pgrate.php

示例3: DbFunctions

 function build_edit_emergency_popup($id)
 {
     $db_functions_obj = new DbFunctions();
     $helper_obj = new Helper();
     $emergency_info = $db_functions_obj->get_emergency_by_id($id);
     global $base_path;
     $operator = new Operator();
     $output = "<div class='popup-header'>" . $helper_obj->t("Edit Emergency Call") . "</div>";
     $output .= "<form class='form-horizontal form-validate form-vertical form-bordered' name='edit_emergency' id='edit_emergency' method='post' action='{$base_path}" . "edit_emergency'>";
     $output .= "<div class='control-group'>\n                        <label class='control-label' for='textarea'>name</label>\n                        <div class='controls'>\n                            <input id='textfield' class='input-xlarge' type='text' data-rule-required='true' value='{$emergency_info->name}' placeholder='{$emergency_info->name}' name='name'>\n                        </div>\n                    </div>";
     $output .= "<div class='control-group'>\n                        <label class='control-label' for='numberfield'>phone</label>\n                        <div class='controls'>\n                            <input id='numberfield' class='input-xlarge' type='text' data-rule-number='true' data-rule-required='true' value='{$emergency_info->phone}' placeholder='{$emergency_info->phone}' name='phone'>\n                        </div>\n                    </div>";
     $output .= $operator->build_country_list('emergency', $emergency_info->country_id);
     $output .= "<input type='hidden' name='emergency_id' value='" . $emergency_info->id . "'>";
     $output .= "<input class='btn btn-primary' type='submit' value='" . $helper_obj->t("Save") . "'>";
     $output .= "</form>";
     $output .= "<script>\n                    \$(document).ready(function() {        \n                       \$(\"#emergency_textfield\").datepicker();   \n                     \n                       \$('#edit_emergency').ajaxForm(function(res) { \n                           var isvalid = \$(\"#edit_emergency\").valid();\n                           if (isvalid) { \n                               var data = res.split(\"***#***\");   \n                               \$('#emergency_' + data[1]).after(data[0]);\n                               \$('#emergency_' + data[1]).remove(); \n                               closePopup();\n                           }  \n                       }); \n                    });\n                    </script>";
     return $output;
 }
开发者ID:arh922,项目名称:ain,代码行数:18,代码来源:emergency_calls.php

示例4: DbFunctions

 function build_edit_hitd_popup($id)
 {
     $db_functions_obj = new DbFunctions();
     $helper_obj = new Helper();
     $hitd_info = $db_functions_obj->get_hitd_by_id($id);
     global $base_path;
     $output = "<div class='popup-header'>" . $helper_obj->t("Edit Happened in this day") . "</div>";
     $output .= "<form class='form-horizontal form-validate form-vertical form-bordered' name='edit_hitd' id='edit_hitd' method='post' action='{$base_path}" . "edit_hitd'>";
     $output .= "<div class='control-group'>\n                            <label class='control-label' for='textarea'>body</label>\n                            <div class='controls'>\n                                <textarea id='textarea' class='input-block-level' rows='5' name='hitd_textarea'>{$hitd_info->body}</textarea>\n                            </div>\n                        </div>";
     $output .= '<div class="control-group">
                         <label class="control-label" for="textfield">Date</label>
                         <div class="controls">
                             <input placeholder="' . $hitd_info->date . '" value="' . $hitd_info->date . '" class="input-medium " type="text" name="hitd_textfield" id="hitd_textfield" data-date-format="yyyy-mm-dd">
                         </div>
                     </div>';
     $output .= "<input type='hidden' name='hitd_id' value='" . $hitd_info->id . "'>";
     $output .= "<input class='btn btn-primary' type='submit' value='" . $helper_obj->t("Save") . "'>";
     $output .= "</form>";
     $output .= "<script>\n           \$(document).ready(function() {        \n                       \$(\"#hitd_textfield\").datepicker();   \n                     \n                       \$('#edit_hitd').ajaxForm(function(res) { \n                           var isvalid = \$(\"#edit_hitd\").valid();\n                           if (isvalid) { \n                               var data = res.split(\"***#***\");   \n                               \$('#happened_' + data[1]).after(data[0]);\n                               \$('#happened_' + data[1]).remove(); \n                               closePopup();\n                           }  \n                       }); \n                    });\n                    </script>";
     return $output;
 }
开发者ID:arh922,项目名称:ain,代码行数:21,代码来源:happened_in_this_day.php

示例5: Helper

 function build_send_push_notificatation_form()
 {
     $helper_obj = new Helper();
     global $base_path;
     $client_obj = new Client();
     $output = '<div class="box box-bordered">';
     $output .= '<div class="box-title">
                             <h3><i class="icon-th-list"></i> Send Push Notification</h3>
                   </div>';
     $output .= "<div class='box-content nopadding'>";
     $output .= "<form class='form-horizontal form-validate form-vertical form-bordered' name='send_pn_action' id='send_pn_action' method='post' action='{$base_path}" . "send_pn_action'>";
     $output .= $client_obj->build_clients_list("add");
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Message Body</label>\n                        <div class='controls'>\n                           <textarea placeholder='Message' data-rule-required='true' name='msg' id='msg'></textarea><br />   \n                        </div>    \n                    </div>";
     $output .= "<input class=\"btn btn-primary\" type='submit' value='" . $helper_obj->t("Save") . "'>";
     $output .= "<input style='display: none' type='reset' id='add_client_reset'>";
     $output .= "</form>";
     $output .= "</div>";
     $output .= "</div><br />";
     $output .= "<div style='color: red'>Note: If you choose 'Select ...' in clients list that mean you will send PN for all tokens</div><br /><br />";
     return $output;
 }
开发者ID:arh922,项目名称:ain,代码行数:21,代码来源:push_notification.php

示例6: DbFunctions

 function build_edit_video_popup($vid)
 {
     $db_functions_obj = new DbFunctions();
     $validation_js_obj = new Validation_js();
     $cat_obj = new Category();
     $helper_obj = new Helper();
     $pgrate_obj = new Pgrate();
     global $base_path;
     $vid_info = $db_functions_obj->get_vid_by_id($vid);
     $output = "";
     $output = $validation_js_obj->edit_video_validation();
     $output .= "<script>\$(document).ready(function() {  \$('#edit_video').ajaxForm(function(res) { \n                        var isvalid = \$(\"#edit_video\").valid();\n                        if (isvalid) { \n                            var data = res.split(\"***#***\");   \n                            \$('#vid_' + data[1]).after(data[0]);\n                            \$('#vid_' + data[1]).remove(); \n                            closePopup();\n                        }  \n                    }); });</script>";
     $feature_checked = "";
     if ($vid_info->featured) {
         $feature_checked = "checked='checked'";
     }
     $premium_checked = "";
     if ($vid_info->premium) {
         $premium_checked = "checked='checked'";
     }
     $output .= "<div class='popup-header'>" . $helper_obj->t("Edit Video") . " " . $vid_info->title . "</div>";
     $output .= "<form class='form-horizontal form-validate form-vertical form-bordered' name='edit_video' id='edit_video' method='post' action='{$base_path}" . "edit_video'>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Title</label>\n                        <div class='controls'>\n                           <input type='text' id='title_updated' name='title_updated' value='" . $vid_info->title . "'>\n                        </div>\n                      </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Title</label>\n                        <div class='controls'>\n                           <textarea name='description_updated' id='description_updated'>{$vid_info->description}</textarea>\n                        </div>\n                      </div>";
     $output .= $cat_obj->build_categories_list('edit', $vid_info->cat_id);
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Image1</label>\n                        <div class='controls'>\n                            <input accept='image/*' type='file' name='image1_updated' id='image1_updated'><img src='" . VIDEOS_IMAGES_THUMBNAIL_PATH . $vid_info->image1 . "' width=" . IMG_WIDTH_EDIT_VID . " height=" . IMG_HIEGHT_EDIT_VID . ">\n                        </div>\n                      </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Image2</label>\n                        <div class='controls'>\n                            <input accept='image/*' type='file' name='image2_updated' id='image2_updated'><img src='" . VIDEOS_IMAGES_THUMBNAIL_PATH . $vid_info->image2 . "' width=" . IMG_WIDTH_EDIT_VID . " height=" . IMG_HIEGHT_EDIT_VID . ">\n                        </div>\n                      </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Image3</label>\n                        <div class='controls'>\n                             <input accept='image/*' type='file' name='image3_updated' id='image3_updated'><img src='" . VIDEOS_IMAGES_THUMBNAIL_PATH . $vid_info->image3 . "' width=" . IMG_WIDTH_EDIT_VID . " height=" . IMG_HIEGHT_EDIT_VID . ">\n                        </div>\n                      </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Image4</label>\n                        <div class='controls'>\n                            <input accept='image/*' type='file' name='image4_updated' id='image4_updated'><img src='" . VIDEOS_IMAGES_THUMBNAIL_PATH . $vid_info->image4 . "' width=" . IMG_WIDTH_EDIT_VID . " height=" . IMG_HIEGHT_EDIT_VID . ">\n                        </div>\n                      </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>ScreenShot</label>\n                        <div class='controls'>\n                            <input accept='image/*' type='file' name='screenshot_updated' id='screenshot_updated'><img src='" . VIDEOS_IMAGES_THUMBNAIL_PATH . $vid_info->screenshot . "' width=" . IMG_WIDTH_EDIT_VID . " height=" . IMG_HIEGHT_EDIT_VID . ">\n                        </div>\n                     </div>";
     $output .= $pgrate_obj->build_pgrate_list("edit", $vid_info->pgrate_id);
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Featured</label>\n                        <div class='controls'>\n                           <input {$feature_checked} type='checkbox' value='1' id='featured_updated' name='featured_updated'>" . $helper_obj->t("Featured") . "</div>\n                      </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Premium</label>\n                        <div class='controls'>\n                          <input {$premium_checked} type='checkbox' value='1' id='premium_updated' name='premium_updated'>" . $helper_obj->t("Premium") . "</div>\n                      </div>";
     $output .= "<input class='btn btn-primary' type='submit' value='" . $helper_obj->t("Save") . "'>";
     $output .= "<input type='hidden' name='edit_vid' id='edit_vid' value='" . $vid_info->id . "'>";
     $output .= "</form>";
     return $output;
 }
开发者ID:arh922,项目名称:ain,代码行数:38,代码来源:video.php

示例7: Helper

 function build_client_row($client_info)
 {
     $helper_obj = new Helper();
     $output = "<tr id='client_{$client_info->id}'>\n                     <td>" . $client_info->id . "</td>\n                     <td>" . $client_info->name . "</td>\n                     <td>" . $client_info->logo . "</td>\n                     <td><div id='client_status_{$client_info->id}'>" . ($client_info->status == 1 ? $helper_obj->t("Active") : $helper_obj->t("Deactive")) . "</div></td>\n                     <td>" . date(DATE_FORMAT, $client_info->date_added) . "</td>\n                     <td>" . $client_info->added_by . "</td>\n                     <td>" . ($client_info->date_updated != "" ? date(DATE_FORMAT, $client_info->date_updated) : "") . "</td>\n                     <td>" . $client_info->updated_by . "</td>\n                     <td><a href='javascript:void(0);' onclick='openEditClientPopup({$client_info->id})'>" . $helper_obj->t("Edit") . "</a></td>\n                     <td><a href='javascript:void(0);' onclick='activeDeactiveClient({$client_info->id})'>\n                          <div id='deactive_{$client_info->id}'>" . ($client_info->status == 0 ? $helper_obj->t("Activate") : $helper_obj->t("Deactivate")) . "</div>\n                         </a>\n                     </td>\n                  </tr>";
     return $output;
 }
开发者ID:arh922,项目名称:ain,代码行数:6,代码来源:client.php

示例8: Helper

 function build_user_row($data)
 {
     //  pr($data);
     $helper_obj = new Helper();
     $output = "<tr id='user_{$data->id}'>\n                          <td>" . $data->id . "</td>\n                          <td>" . $data->username . "</td>\n                          <td>" . $data->email . "</td>\n                          <td>" . $data->phone . "</td>\n                          <td>" . $data->role_name . "</td>\n                          <td>" . $data->country_name . "</td>\n                          <td>" . $data->operator_name . "</td>\n                          <td>" . $data->client_name . "</td>\n                          <td><div id='user_status_{$data->id}'>" . ($data->status == 1 ? $helper_obj->t("Active") : $helper_obj->t("Deactive")) . "</div></td>\n                          <td>" . date(DATE_FORMAT, $data->date_added) . "</td> \n                          <td><a href='javascript:void(0);' onclick='openEditUserPopup({$data->id})'>" . $helper_obj->t("Edit") . "</a></td>\n                          <td><a href='javascript:void(0);' onclick='activeDeactiveUser({$data->id})'>\n                                <div id='deactive_{$data->id}'>" . ($data->status == 1 ? $helper_obj->t("Deactivate") : $helper_obj->t("Activate")) . "</div>\n                              </a>\n                          </td>\n                       </tr>";
     return $output;
 }
开发者ID:arh922,项目名称:ain,代码行数:7,代码来源:user.php

示例9: DbFunctions

 function build_edit_category_popup($category_id)
 {
     $db_functions_obj = new DbFunctions();
     $helper_obj = new Helper();
     $category_info = $db_functions_obj->get_category_by_id($category_id);
     global $base_path;
     $premium_checkbox = "";
     if ($category_info['premium']) {
         $premium_checkbox = "checked = 'checked'";
     }
     /* $output = '<!-- Validation -->
        <script src="' . $base_path . 'js/plugins/validation/jquery.validate.min.js"></script>
        <script src="' . $base_path . 'js/plugins/validation/additional-methods.min.js"></script>                                 
        <script src="' . $base_path . 'js/plugins/datepicker/bootstrap-datepicker.js"></script>';*/
     $output = "<script>\$(document).ready(function() {  \n                        \$('#edit_category').ajaxForm(function(res) {   \n                        var isvalid = \$(\"#edit_category\").valid(); //alert(isvalid);  \n                        if (isvalid) { \n                            var data = res.split(\"***#***\");   \n                            \$('#category_' + data[1]).after(data[0]);\n                            \$('#category_' + data[1]).remove(); \n                            closePopup();\n                        }  \n                    }); });</script>";
     //$BUCKET = 'cosmic-descent-775.appspot.com/cat/';
     //$options = [ 'gs_bucket_name' => $BUCKET ];
     //$upload_url = CloudStorageTools::createUploadUrl('/edit_category', $options);
     $output .= "<div class='popup-header'>" . $helper_obj->t("Edit Category") . " (" . $category_info['name'] . ")</div>";
     $output .= "<form class='form-horizontal form-validate form-vertical form-bordered' name='edit_category' id='edit_category' method='post' action='edit_category'>";
     $output .= $this->build_categories_list('add_parent', array($category_info['parent']), '', '', false);
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='category_name'>Category Name</label>\n                        <div class='controls'>\n                          <input value ='" . $category_info['name'] . "' class='input-xlarge' data-rule-required='true' data-rule-minlength='2' type='text' id='category_name_update' name='category_name_update' placeholder='" . $helper_obj->t("Name") . "'>\n                        </div>\n                      </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Image1</label>\n                        <div class='controls'>\n                           <input type='file' name='image1_update' id='image1_update' accept='image/*' > \n                        </div>   \n                        <div style='margin-left: 380px;margin-top: -50px;'><img src=" . CATEGORIES_IMAGES_PATH . $category_info['image1'] . " width=77 height=77></div>\n                    </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Image2</label>\n                        <div class='controls'>\n                           <input accept='image/*' type='file' name='image2_update' id='image2_update'> \n                        </div>\n                        <div style='margin-left: 380px;margin-top: -50px;'><img src=" . CATEGORIES_IMAGES_PATH . $category_info['image2'] . " width=77 height=77></div> \n                    </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'></label>\n                        <div class='controls'> \n                           <label class='checkbox'><input value='1' {$premium_checkbox} type='checkbox' name='premium_update' id='premium_update'>Premium</label>\n                        </div>\n                  </div>";
     $output .= "<input class='btn btn-primary' type='submit' value='" . $helper_obj->t("Save") . "'>";
     $output .= "<input type='hidden' name='category_id_updated' value='" . $category_info['id'] . "'>";
     $output .= "</form>";
     return $output;
 }
开发者ID:arh922,项目名称:ain,代码行数:30,代码来源:category.php

示例10: Helper

 function build_related_tags_form()
 {
     $helper_obj = new Helper();
     $tag_obj = new Tag();
     global $base_path;
     //  $limitation = explode("_",$limit);
     //
     //  $from = $limitation[0];
     //  $offset = $limitation[1];
     $output = '<div class="box box-bordered">';
     $output .= '<div class="box-title">
                       <h3><i class="icon-th-list"></i> Add Realted Tags</h3>
                   </div>';
     $output .= "<div class='box-content nopadding'>";
     $output .= "<form class='form-horizontal form-validate form-vertical form-bordered' name='add_related_tag' id='add_related_tag' method='post' action='{$base_path}" . "add_related_tag'>";
     //$output .= $tag_obj->build_tags_single_list("add", "", "onchange='getRelatedTags(this)'", "", $from, $offset);
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='tag_name'>Parent Tag</label>\n                        <div class='controls'>\n                          <input class='input-xlarge' data-rule-required='true' data-rule-minlength='2' type='text' id='main_tag_name' name='main_tag_name' placeholder='" . $helper_obj->t("Name") . "'>\n                        </div>\n                      </div>";
     $output .= "<input class=\"btn btn-primary\" type='button' value='Search' onclick=getRelatedTags()>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='tag_name'>Related Tags Name</label>\n                        <div class='controls' id='related_tags_div'>\n                          \n                        </div>\n                      </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='tag_name'>New Related Tag Name</label>\n                        <div class='controls'>\n                          <input class='input-xlarge' data-rule-required='true' data-rule-minlength='2' type='text' id='tag_name' name='tag_name' placeholder='" . $helper_obj->t("Name") . "'>\n                          <div>كلمة1,كلمة2,كلمة3</div> \n                        </div>\n                      </div>";
     $output .= "<input class=\"btn btn-primary\" type='submit' value='" . $helper_obj->t("Save") . "'>";
     $output .= "<input style='display: none' type='reset' id='add_tag_reset'>";
     $output .= "</form>";
     $output .= "</div>";
     $output .= "</div><br /><br />";
     return $output;
 }
开发者ID:arh922,项目名称:ain,代码行数:27,代码来源:tag.php

示例11: DbFunctions

 function build_edit_zodiac_popup($id)
 {
     $db_functions_obj = new DbFunctions();
     $helper_obj = new Helper();
     $zodiac_info = $db_functions_obj->get_zodiac_by_id($id);
     global $base_path;
     $operator = new Operator();
     $output = "<div class='popup-header'>" . $helper_obj->t("Edit Zodiac") . "</div>";
     $output .= "<form class='form-horizontal form-validate form-vertical form-bordered' name='edit_zodiac' id='edit_zodiac' method='post' action='{$base_path}" . "edit_zodiac'>";
     //$output .= $this->build_zodiac_list($zodiac_info->name);
     $output .= "<div class='control-group'>\n                        <label class='control-label' for='textarea'>body</label>\n                        <div class='controls'>\n                            <textarea id='textarea' class='input-block-level' data-rule-required='true' rows='5' value='{$zodiac_info->body}' name='body'>{$zodiac_info->body}</textarea>\n                        </div>\n                    </div>";
     $output .= "<input type='hidden' name='zodiac_id' value='" . $zodiac_info->id . "'>";
     $output .= "<input class='btn btn-primary' type='submit' value='" . $helper_obj->t("Save") . "'>";
     $output .= "</form>";
     $output .= "<script>\n                    \$(document).ready(function() {        \n                       \$(\"#zodiac_textfield\").datepicker();   \n                     \n                       \$('#edit_zodiac').ajaxForm(function(res) { \n                           var isvalid = \$(\"#edit_zodiac\").valid();\n                           if (isvalid) { \n                               var data = res.split(\"***#***\");   \n                               \$('#zodiac_' + data[1]).after(data[0]);\n                               \$('#zodiac_' + data[1]).remove(); \n                               closePopup();\n                           }  \n                       }); \n                    });\n                    </script>";
     return $output;
 }
开发者ID:arh922,项目名称:ain,代码行数:17,代码来源:zodiac.php

示例12: Helper

 function search_news($word)
 {
     global $base_path;
     $helper_obj = new Helper();
     $output = "";
     if ($helper_obj->user_is_logged_in() && $helper_obj->check_role(CLIENT_ROLE_ID)) {
         $db_function_obj = new DbFunctions();
         $word = urldecode($word);
         if (mb_strlen($word, "UTF-8") > 5) {
             $search_results = $db_function_obj->search_news($word);
             //$output .= '<script src="js/plugins/ckeditor/ckeditor.js"></script>';
             $output .= "<table id='add_article_html_table' style='font-size: 10px' class='table table-hover table-nomargin table-bordered'>\n                          <tr>\n                            <th>" . $helper_obj->t("ID") . "</th>\n                            <th>" . $helper_obj->t("Title") . "</th>     \n                            <th>" . $helper_obj->t("Image") . "</th>  \n                            <th>" . $helper_obj->t("Added By") . "</th>  \n                            <th>" . $helper_obj->t("Date Added") . "</th>  \n                            <th>" . $helper_obj->t("Edit") . "</th>\n                            <th>" . $helper_obj->t("Delete") . "</th>\n                          </tr>";
             foreach ($search_results as $data) {
                 $class = $helper_obj->table_row_class($i);
                 $output .= "<tr id='article_{$data['id']}'>\n                                  <td>" . $data['id'] . "</td>\n                                  <td>" . $data['title'] . "</td>      \n                                  <td>" . $data['image'] . "</td>      \n                                  <td>" . $data['added_by'] . "</td>      \n                                  <td>" . date(DATE_FORMAT, $data['date_added']) . "</td>      \n                                  <td><a href='javascript:void(0);' onclick='openEditHtmlArticlePopup({$data['id']})'>" . $helper_obj->t("Edit") . "</a></td>\n                                  <td><a href='javascript:void(0);' onclick='deleteHtmlArticle({$data['id']})'>" . $helper_obj->t("Delete") . "</a></td>\n                               </tr>";
             }
         } else {
             echo '<tr><td><b>يجب ادخال كلمة اكتر من 5 احرف</b></td></tr>';
         }
         $output .= "</table>";
     }
     echo $output;
     exit;
 }
开发者ID:arh922,项目名称:ain,代码行数:24,代码来源:controller.php

示例13: DbFunctions

 function open_edit_operator_popup($operator_id)
 {
     $db_functions_obj = new DbFunctions();
     $helper_obj = new Helper();
     $operator_info = $db_functions_obj->get_operator_by_id($operator_id);
     global $base_path;
     $output = "<script>\$(document).ready(function() {  \n                        \$('#edit_operator').ajaxForm(function(res) { \n                        var isvalid = \$(\"#edit_operator\").valid();\n                        if (isvalid) { \n                            var data = res.split(\"***#***\");   \n                            \$('#operator_' + data[1]).after(data[0]);\n                            \$('#operator_' + data[1]).remove(); \n                            closePopup();\n                        }  \n                    }); });</script>";
     $output .= "<div class='popup-header'>" . $helper_obj->t("Edit Operator") . " " . $operator_info['name'] . "</div>";
     $output .= "<form class='form-horizontal form-validate form-vertical form-bordered' name='edit_operator' id='edit_operator' method='post' action='{$base_path}" . "edit_operator'>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Operator Name</label>\n                        <div class='controls'>\n                           <input class='input-xlarge' data-rule-required='true' data-rule-minlength='2' value='" . $operator_info['name'] . "' type='text' id='operator_name_updated' name='operator_name_updated' placeholder='" . $helper_obj->t("Name") . "'>\n                        </div>\n                     </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Paid Shortcode</label>\n                        <div class='controls'>\n                          <input value='" . $operator_info['paid_shortcode'] . "' data-rule-number='true' class='input-xlarge' data-rule-required='true' data-rule-minlength='4' type='text' id='paid_sc_updated' name='paid_sc_updated' placeholder='" . $helper_obj->t("Paid Shortcode") . "'>\n                        </div>\n                      </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Free Shortcode</label>\n                        <div class='controls'>\n                          <input value='" . $operator_info['free_shortcode'] . "' data-rule-number='true' class='input-xlarge' data-rule-required='true' data-rule-minlength='4' type='text' id='free_sc_updated' name='free_sc_updated' placeholder='" . $helper_obj->t("Free Shortcode") . "'>\n                        </div>\n                      </div>";
     $selected_mt = '';
     $selected_mo = '';
     if ($operator_info['type'] == 'MT') {
         $selected_mt = 'selected="selected"';
     }
     if ($operator_info['type'] == 'MO') {
         $selected_mo = 'selected="selected"';
     }
     $output .= '<div class="control-group"> 
                     <label for="client_name" class="control-label">Type</label>
                     <div class="controls">
                         <select name="type_updated" id="type_updated" data-rule-required="true" class="input-xlarge">
                             <option value="">Select...</option>
                             <option ' . $selected_mo . ' value="MO">MO</option>
                             <option ' . $selected_mt . 'value="MT">MT</option>
                         </select>
                     </div></div>';
     $output .= "";
     $output .= "<input class='btn btn-primary' type='submit' value='" . $helper_obj->t("Save") . "'>";
     $output .= "<input type='hidden' name='operator_id_updated' value='" . $operator_info['id'] . "'>";
     $output .= "</form>";
     return $output;
 }
开发者ID:arh922,项目名称:ain,代码行数:35,代码来源:operator.php

示例14: DbFunctions

 function build_country_category_rss_source_row($id)
 {
     $db_functions_obj = new DbFunctions();
     $helper_obj = new Helper();
     $data = $db_functions_obj->get_country_category_rss_source_by_id($id);
     $output = "<tr id='rss_{$data->id}'>\n                          <td>" . $data->id . "</td>\n                          <td>" . $data->country_name . "</td>      \n                          <td>" . $data->category_name . "</td>  \n                          <td>" . $data->source_name . "</td>  \n                          <td><a href='javascript:void(0);' onclick='deleteCountryCategoryRssSource({$data->id})'>" . $helper_obj->t("Delete") . "</a></td>\n                       </tr>";
     return $output;
 }
开发者ID:arh922,项目名称:ain,代码行数:8,代码来源:rss_source.php

示例15: DbFunctions

 function build_edit_article_popup($aid)
 {
     $db_functions_obj = new DbFunctions();
     $validation_js_obj = new Validation_js();
     $cat_obj = new Category();
     $helper_obj = new Helper();
     $pgrate_obj = new Pgrate();
     global $base_path;
     $article_info = $db_functions_obj->get_article_by_id($aid);
     $output = "";
     $output = $validation_js_obj->edit_article_validation();
     $output .= "<script>\$(document).ready(function() {  \$('#edit_article').ajaxForm(function(res) { \n                        var isvalid = \$(\"#edit_article\").valid();\n                        if (isvalid) { \n                            var data = res.split(\"***#***\");   \n                            \$('#article_' + data[1]).after(data[0]);\n                            \$('#article_' + data[1]).remove(); \n                            closePopup();\n                        }  \n                    }); });</script>";
     $output .= "<div class='popup-header'>" . $helper_obj->t("Edit Article") . " " . $article_info->title . "</div>";
     $output .= "<form class='form-horizontal form-validate form-vertical form-bordered' name='edit_article' id='edit_article' method='post' action='{$base_path}" . "edit_article'>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Title</label>\n                        <div class='controls'>\n                           <input type='text' id='title_updated' name='title_updated' value='" . $article_info->title . "'>\n                        </div>\n                      </div>";
     $output .= $cat_obj->build_categories_list('edit', $article_info->cat_id);
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Text1</label>\n                        <div class='controls' style='float: left; margin-right: -70; margin-left: 0;width: 231px'>\n                           <textarea name='text1_updated' id='text1_updated'>{$article_info->text1}</textarea><br />\n                           <input type='text' style='font-size: 11px;width: 65px' name='text1_order_updated' value='{$article_info->text1_order}'></input>\n                        </div>\n                        \n                        <div class='controls' style='float: left; margin-right: -70; margin-left: 0;width: 231px'>\n                            <textarea name='text2_updated' id='text2_updated'>{$article_info->text2}</textarea> <br />\n                            <input type='text' style='font-size: 11px;width: 65px' name='text2_order_updated' value='{$article_info->text2_order}'></input> \n                        </div>\n                        \n                        <div class='controls' style='float: left; margin-right: -70; margin-left: 0;width: 233px'>\n                            <textarea name='text3_updated' id='text3_updated'>{$article_info->text3}</textarea> <br />\n                            <input type='text' style='font-size: 11px;width: 65px' name='text3_order_updated' value='{$article_info->text3_order}'></input>    \n                        </div>\n                        \n                      </div>";
     /* $output .= "<div class='control-group'> 
          <label class='control-label' for='client_name'>Text2</label>
          <div class='controls' style='float: left; margin-right: -70; margin-left: 0;width: 231px'>
              <textarea name='text2_updated' id='text2_updated'>$article_info->text2</textarea> <br />
              <input type='text' style='font-size: 11px;width: 65px' name='text2_order_updated' value='$article_info->text2_order'></input> 
          </div>
          
          <div class='controls' style='float: left; margin-right: -70; margin-left: 0;width: 49%'>
              <textarea name='text3_updated' id='text3_updated'>$article_info->text3</textarea> <br />
              <input type='text' style='font-size: 11px;width: 65px' name='text3_order_updated' value='$article_info->text3_order'></input>    
          </div>
          
        </div>";  */
     /*   $output .= "<div class='control-group'> 
            <label class='control-label' for='client_name'>Text3</label>
            <div class='controls'>
                <textarea name='text3_updated' id='text3_updated'>$article_info->text3</textarea> <br />
                <input type='text' style='font-size: 11px;width: 65px' name='text3_order_updated' value='$article_info->text3_order'></input>    
            </div>
          </div>";  */
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Image1</label>\n                        <div class='controls'>\n                            <input accept='image/*' type='file' name='image1_updated' id='image1_updated'><img src='" . VIDEOS_IMAGES_THUMBNAIL_PATH . $article_info->image1 . "' width=" . IMG_WIDTH_EDIT_VID . " height=" . IMG_HIEGHT_EDIT_VID . ">\n                            <input type='text' style='font-size: 11px;width: 65px' name='image1_order_updated' value='{$article_info->image1_order}'></input> \n                        </div>\n                      </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Image2</label>\n                        <div class='controls'>\n                            <input accept='image/*' type='file' name='image2_updated' id='image2_updated'><img src='" . VIDEOS_IMAGES_THUMBNAIL_PATH . $article_info->image2 . "' width=" . IMG_WIDTH_EDIT_VID . " height=" . IMG_HIEGHT_EDIT_VID . ">\n                            <input type='text' style='font-size: 11px;width: 65px' name='image2_order_updated' value='{$article_info->image2_order}'></input>\n                        </div>\n                      </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Image3</label>\n                        <div class='controls'>\n                            <input accept='image/*' type='file' name='image3_updated' id='image3_updated'><img src='" . VIDEOS_IMAGES_THUMBNAIL_PATH . $article_info->image3 . "' width=" . IMG_WIDTH_EDIT_VID . " height=" . IMG_HIEGHT_EDIT_VID . ">\n                            <input type='text' style='font-size: 11px;width: 65px' name='image3_order_updated' value='{$article_info->image3_order}'></input>\n                        </div>\n                      </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Image4</label>\n                        <div class='controls'>\n                             <input accept='image/*' type='file' name='image4_updated' id='image4_updated'><img src='" . VIDEOS_IMAGES_THUMBNAIL_PATH . $article_info->image4 . "' width=" . IMG_WIDTH_EDIT_VID . " height=" . IMG_HIEGHT_EDIT_VID . ">\n                             <input type='text' style='font-size: 11px;width: 65px' name='image4_order_updated' value='{$article_info->image4_order}'></input>\n                        </div>\n                      </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Image5</label>\n                        <div class='controls'>\n                            <input accept='image/*' type='file' name='image5_updated' id='image5_updated'><img src='" . VIDEOS_IMAGES_THUMBNAIL_PATH . $article_info->image5 . "' width=" . IMG_WIDTH_EDIT_VID . " height=" . IMG_HIEGHT_EDIT_VID . ">\n                            <input type='text' style='font-size: 11px;width: 65px' name='image5_order_updated' value='{$article_info->image5_order}'></input>\n                        </div>\n                      </div>";
     $output .= "<div class='control-group'> \n                        <label class='control-label' for='client_name'>Video1</label>\n                        <div class='controls' style='float: left; margin-right: -70; margin-left: 0;'>\n                           <input type='text' name='video1_updated' value='{$article_info->video1}'></input><br />\n                           <input type='text' style='font-size: 11px;width: 65px' name='video1_order_updated' value='{$article_info->video1_order}'></input> \n                        </div>\n                        \n                        <div class='controls' style='float: left; margin-right: -70; margin-left: 0; width: 49%'>\n                           <input type='text' name='video2_updated' value='{$article_info->video2}'></input><br />\n                           <input type='text'style='font-size: 11px;width: 65px'  name='video2_order_updated' value='{$article_info->video2_order}'></input>\n                        </div>\n                        \n                      </div>";
     /*$output .= "<div class='control-group'> 
         <label class='control-label' for='client_name'>Video2</label>
         <div class='controls'>
            <input type='text' name='video2_updated' value='$article_info->video2'></input><br />
            <input type='text'style='font-size: 11px;width: 65px'  name='video2_order_updated' value='$article_info->video2_order'></input>
         </div>
       </div>"; */
     $output .= $pgrate_obj->build_pgrate_list("edit", $article_info->pgrate_id);
     /*    $output .= "<div class='control-group'> 
                             <label class='control-label' for='client_name'>Ordering</label>
                             <div class='controls'>               
     
                             </div>
                           </div>";    */
     $radio1 = "";
     $radio2 = "";
     $radio3 = "";
     if ($article_info->section == 1) {
         $radio1 = "checked='checked'";
     }
     if ($article_info->section == 2) {
         $radio2 = "checked='checked'";
     }
     if ($article_info->section == 3) {
         $radio3 = "checked='checked'";
     }
     $output .= '<div class="control-group">
                     <label class="control-label">Main Category in home page</label>
                     <div class="controls">
                         <label class="radio">
                             <input ' . $radio1 . ' type="radio" name="section" value="1"> Top Section
                         </label>
                         <label class="radio">
                             <input ' . $radio2 . ' type="radio" name="section" value="2"> Middle Section 
                         </label>
                         <label class="radio">
                             <input ' . $radio3 . ' type="radio" name="section" value="3"> Bottom Section 
                         </label>
                     </div>
                 </div>';
     $output .= "<input class='btn btn-primary' type='submit' value='" . $helper_obj->t("Save") . "'>";
     $output .= "<input type='hidden' name='edit_article' id='edit_article' value='" . $article_info->id . "'>";
     $output .= "</form>";
     return $output;
 }
开发者ID:arh922,项目名称:ain,代码行数:88,代码来源:article.php


注:本文中的Helper::t方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。