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


PHP encoder_place_redirect函数代码示例

本文整理汇总了PHP中encoder_place_redirect函数的典型用法代码示例。如果您正苦于以下问题:PHP encoder_place_redirect函数的具体用法?PHP encoder_place_redirect怎么用?PHP encoder_place_redirect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: Street

                $About_Street = "Not Filled";
            }
            /**
             * get the about the street in amharic
             */
            if (!empty($_POST["About_Street_Amharic"])) {
                $About_Street_Amharic = $_POST["About_Street_Amharic"];
            } else {
                $About_Street_Amharic = "Not Filled";
            }
            if (empty($errors)) {
                //make a street object
                $Street_C = new Street($Street_Name, $Street_Name_Amharic, $About_Street, $About_Street_Amharic);
                //check if the street exists in the database
                //if the street exists redirect, saying the street is repetition
                if ($encoder_con->Street_Exists($Street_C)) {
                    encoder_place_redirect(Error_Type::SAME_REGISTERED_DATA);
                }
                //add the street to the database
                $added = $encoder_con->Add_Street($Street_C);
                if ($added) {
                    encoder_redirect_success($Street_C);
                } else {
                    encoder_place_redirect(Error_Type::DATA_BASE);
                }
            } else {
                encoder_place_redirect(Error_Type::FORM);
            }
        }
    }
}
开发者ID:rogermule,项目名称:afalagi-web,代码行数:31,代码来源:Add_Street.php

示例2: Event

            //get event end
            if (empty($_POST['Event_End'])) {
                $errors[] = "Event end should be filled";
            } else {
                $Event_End = $_POST['Event_End'];
            }
            if (empty($_POST['Event_ID'])) {
                $errors[] = "Event ID should be filled";
            } else {
                $Event_ID = $_POST['Event_ID'];
            }
            if (empty($errors)) {
                $Event = new Event($Name, $Name_Amharic, $About_Event, $About_Event_Amharic, $Event_Start, $Event_End);
                if ($encoder_con->Event_Exists_For_Edit($Event, $Event_ID)) {
                    encoder_place_redirect(Error_Type::SAME_USER_NAME, $Event_ID);
                }
                $added = $encoder_con->Edit_Event($Event, $Event_ID);
                /**
                 * inform the encoder about the result
                 */
                if ($added) {
                    encoder_redirect_success($Event);
                } else {
                    encoder_place_redirect(Error_Type::DATA_BASE, $Event_ID);
                }
            } else {
                encoder_place_redirect(Error_Type::FORM, $Event_ID);
            }
        }
    }
}
开发者ID:rogermule,项目名称:afalagi-web,代码行数:31,代码来源:Edit_Event.php

示例3: City

            }
            if (empty($_POST['Name_Amharic'])) {
                $errors[] = "Amharic name should be filled";
            } else {
                $Name_Amharic = $_POST['Name_Amharic'];
            }
            if (empty($_POST['City_ID'])) {
                $errors[] = "City ID should be filled";
            } else {
                $City_ID = $_POST['City_ID'];
            }
            if (empty($errors)) {
                $city = new City($Name, $Name_Amharic);
                if ($encoder_con->City_Exists_For_Edit($city, $City_ID)) {
                    encoder_place_redirect(Error_Type::SAME_USER_NAME, $City_ID);
                }
                $added = $encoder_con->Edit_City($city, $City_ID);
                /**
                 * inform the encoder about the result
                 */
                if ($added) {
                    encoder_redirect_success($city);
                } else {
                    encoder_place_redirect(Error_Type::DATA_BASE, $City_ID);
                }
            } else {
                encoder_place_redirect(Error_Type::FORM, $City_ID);
            }
        }
    }
}
开发者ID:rogermule,项目名称:afalagi-web,代码行数:31,代码来源:Edit_City.php

示例4: header

        }
    }
    $dir = "VIEW/html/Encoder/Add_Specialization/Delete_Specialization.php?error={$error_type}&Specialization_ID={$Specialization_ID}";
    $url = BASE_URL . $dir;
    header("Location:{$url}");
    exit;
}
if ($_SERVER['REQUEST_METHOD'] == "POST") {
    if (TRUE == check_login_status()) {
        $user_type = get_user_type();
        if ($user_type == User_Type::ENCODER) {
            $encoder = $_SESSION['Logged_In_User'];
            $encoder_con = new Encoder_Controller($encoder);
            if (isset($_POST['Specialization_ID'])) {
                $Specialization_ID = $_POST['Specialization_ID'];
            } else {
                $errors[] = "Specialization id should be filled";
            }
            if (empty($errors)) {
                $deleted = $encoder_con->Delete_Specialization($Specialization_ID);
                if ($deleted) {
                    encoder_redirect_success();
                } else {
                    encoder_place_redirect(Error_Type::DATA_BASE, $Specialization_ID);
                }
            } else {
                encoder_place_redirect(Error_Type::FORM, $Specialization_ID);
            }
        }
    }
}
开发者ID:rogermule,项目名称:afalagi-web,代码行数:31,代码来源:Delete_Specialization.php

示例5: header

        }
    }
    $dir = "VIEW/html/Encoder/Add_Place/Delete_Street.php?error={$error_type}&Street_ID={$Street_ID}";
    $url = BASE_URL . $dir;
    header("Location:{$url}");
    exit;
}
if ($_SERVER['REQUEST_METHOD'] == "POST") {
    if (TRUE == check_login_status()) {
        $user_type = get_user_type();
        if ($user_type == User_Type::ENCODER) {
            $encoder = $_SESSION['Logged_In_User'];
            $encoder_con = new Encoder_Controller($encoder);
            if (empty($_POST['Street_ID'])) {
                $errors[] = "Street id should be filled";
            } else {
                $Street_ID = $_POST['Street_ID'];
            }
            if (empty($errors)) {
                $deleted = $encoder_con->Delete_Street($Street_ID);
                if ($deleted) {
                    encoder_redirect_success();
                } else {
                    encoder_place_redirect(Error_Type::DATA_BASE, $Street_ID);
                }
            } else {
                encoder_place_redirect(Error_Type::FORM, $Street_ID);
            }
        }
    }
}
开发者ID:rogermule,项目名称:afalagi-web,代码行数:31,代码来源:Delete_Street.php

示例6: header

        }
    }
    $dir = "VIEW/html/Encoder/Add_Place/Delete_Wereda.php?error={$error_type}&Wereda_ID={$Wereda_ID}";
    $url = BASE_URL . $dir;
    header("Location:{$url}");
    exit;
}
if ($_SERVER['REQUEST_METHOD'] == "POST") {
    if (TRUE == check_login_status()) {
        $user_type = get_user_type();
        if ($user_type == User_Type::ENCODER) {
            $encoder = $_SESSION['Logged_In_User'];
            $encoder_con = new Encoder_Controller($encoder);
            if (empty($_POST['Wereda_ID'])) {
                $errors[] = "Wereda id should be filled";
            } else {
                $Wereda_ID = $_POST['Wereda_ID'];
            }
            if (empty($errors)) {
                $deleted = $encoder_con->Delete_Wereda($Wereda_ID);
                if ($deleted) {
                    encoder_redirect_success();
                } else {
                    encoder_place_redirect(Error_Type::DATA_BASE, $Wereda_ID);
                }
            } else {
                encoder_place_redirect(Error_Type::FORM, $Wereda_ID);
            }
        }
    }
}
开发者ID:rogermule,项目名称:afalagi-web,代码行数:31,代码来源:Delete_Wereda.php

示例7: Building

                // 				echo("Building Name = $Building_Name");
                //				echo("<br/>");
                //				echo("Building Name Amharic = $Building_Name_Amharic");
                // 				echo("<br/>");
                // 				echo("Building Description = $Building_Description");
                //				echo("<br/>");
                //				echo("Building Description Amh = $Building_Description_Amharic");
                //				echo("<br/>");
                //				echo("Parking Area = $Parking_Area");
                //				echo("<br/>");
                //				echo("Building Direction = $Direction");
                //				echo("<br/>");
                //				echo("Building Direction amh = $Direction_Amharic");
                $Building_C = new Building($Building_Name, $Building_Name_Amharic, $Building_Description, $Building_Description_Amharic, $Parking_Area);
                if ($encoder_con->Building_Exists_For_Edit($Building_C, $Building_ID)) {
                    encoder_place_redirect(Error_Type::SAME_REGISTERED_DATA, $Building_ID);
                }
                $Place_C = new Place($Region_ID, $City_ID, $Sub_City_ID, $Wereda_ID, $Sefer_ID, $Street_ID);
                $Direction_C = new Direction($Direction, $Direction_Amharic);
                $edited = $encoder_con->Edit_Building($Building_C, $Building_ID, $Place_C, $Place_ID, $Direction_C, $Direction_ID);
                if ($edited) {
                    encoder_redirect_success($Building_C);
                } else {
                    encoder_place_redirect(Error_Type::DATA_BASE, $Building_ID);
                }
            } else {
                encoder_place_redirect(Error_Type::FORM, $Building_ID);
            }
        }
    }
}
开发者ID:rogermule,项目名称:afalagi-web,代码行数:31,代码来源:Edit_Building.php

示例8: Category

                $Name_Amharic = $_POST['Name_Amharic'];
            }
            //get category id
            if (empty($_POST['Category_ID'])) {
                $errors[] = "Category ID should be filled";
            } else {
                $Category_ID = $_POST['Category_ID'];
            }
            //get the gereal category
            if (isset($_POST['General_Category'])) {
                $General_Category = $_POST['General_Category'];
            } else {
                $errors[] = "General category should be filed";
            }
            if (empty($errors)) {
                $Category = new Category($Name, $Name_Amharic, $General_Category);
                if ($encoder_con->Category_Exists_For_Edit($Category, $Category_ID)) {
                    encoder_place_redirect(Error_Type::SAME_USER_NAME, $Category_ID);
                }
                $added = $encoder_con->Edit_Category($Category, $Category_ID);
                if ($added) {
                    encoder_redirect_success();
                } else {
                    encoder_place_redirect(Error_Type::DATA_BASE, $Category_ID);
                }
            } else {
                encoder_place_redirect(Error_Type::FORM, $Category_ID);
            }
        }
    }
}
开发者ID:rogermule,项目名称:afalagi-web,代码行数:31,代码来源:Edit_Category.php

示例9: header

        }
    }
    $dir = "VIEW/html/Encoder/Add_Place/Delete_Phone.php?error={$error_type}&Phone_ID={$Phone_ID}";
    $url = BASE_URL . $dir;
    header("Location:{$url}");
    exit;
}
if ($_SERVER['REQUEST_METHOD'] == "POST") {
    if (TRUE == check_login_status()) {
        $user_type = get_user_type();
        if ($user_type == User_Type::ENCODER or $user_type == User_Type::NORMAL_ENCODER) {
            $encoder = $_SESSION['Logged_In_User'];
            $encoder_con = new Encoder_Controller($encoder);
            if (empty($_POST['Phone_ID'])) {
                $errors[] = "Phone id should be filled";
            } else {
                $Phone_ID = $_POST['Phone_ID'];
            }
            if (empty($errors)) {
                $deleted = $encoder_con->Delete_Phone($Phone_ID);
                if ($deleted) {
                    encoder_redirect_success();
                } else {
                    encoder_place_redirect(Error_Type::DATA_BASE, $Phone_ID);
                }
            } else {
                encoder_place_redirect(Error_Type::FORM, $Phone_ID);
            }
        }
    }
}
开发者ID:rogermule,项目名称:afalagi-web,代码行数:31,代码来源:Delete_Phone.php

示例10: header

        }
    }
    $dir = "VIEW/html/Encoder/Add_Place/Delete_Sefer.php?error={$error_type}&Sefer_ID={$Sefer_ID}";
    $url = BASE_URL . $dir;
    header("Location:{$url}");
    exit;
}
if ($_SERVER['REQUEST_METHOD'] == "POST") {
    if (TRUE == check_login_status()) {
        $user_type = get_user_type();
        if ($user_type == User_Type::ENCODER) {
            $encoder = $_SESSION['Logged_In_User'];
            $encoder_con = new Encoder_Controller($encoder);
            if (empty($_POST['Sefer_ID'])) {
                $errors[] = "Sefer id should be filled";
            } else {
                $Sefer_ID = $_POST['Sefer_ID'];
            }
            if (empty($errors)) {
                $deleted = $encoder_con->Delete_Sefer($Sefer_ID);
                if ($deleted) {
                    encoder_redirect_success();
                } else {
                    encoder_place_redirect(Error_Type::DATA_BASE, $Sefer_ID);
                }
            } else {
                encoder_place_redirect(Error_Type::FORM, $Region_ID);
            }
        }
    }
}
开发者ID:rogermule,项目名称:afalagi-web,代码行数:31,代码来源:Delete_Sefer.php

示例11: Sefer

            }
            if (empty($_POST['Name_Amharic'])) {
                $errors[] = "Amharic name should be filled";
            } else {
                $Name_Amharic = $_POST['Name_Amharic'];
            }
            if (empty($_POST['Sefer_ID'])) {
                $errors[] = "Sefer ID should be filled";
            } else {
                $Sefer_ID = $_POST['Sefer_ID'];
            }
            if (empty($errors)) {
                $Sefer = new Sefer($Name, $Name_Amharic);
                if ($encoder_con->Sefer_Exists_For_Edit($Sefer, $Sefer_ID)) {
                    encoder_place_redirect(Error_Type::SAME_USER_NAME, $Sefer_ID);
                }
                $added = $encoder_con->Edit_Sefer($Sefer, $Sefer_ID);
                /**
                 * inform the encoder about the result
                 */
                if ($added) {
                    encoder_redirect_success($Sefer);
                } else {
                    encoder_place_redirect(Error_Type::DATA_BASE, $Sefer_ID);
                }
            } else {
                encoder_place_redirect(Error_Type::FORM, $Sefer_ID);
            }
        }
    }
}
开发者ID:rogermule,项目名称:afalagi-web,代码行数:31,代码来源:Edit_Sefer.php

示例12: header

        }
    }
    $dir = "VIEW/html/Encoder/Add_Ownership/Delete_Ownership.php?error={$error_type}&Ownership_ID={$Ownership_ID}";
    $url = BASE_URL . $dir;
    header("Location:{$url}");
    exit;
}
if ($_SERVER['REQUEST_METHOD'] == "POST") {
    if (TRUE == check_login_status()) {
        $user_type = get_user_type();
        if ($user_type == User_Type::ENCODER) {
            $encoder = $_SESSION['Logged_In_User'];
            $encoder_con = new Encoder_Controller($encoder);
            if (empty($_POST['Ownership_ID'])) {
                $errors[] = "Ownership id should be filled";
            } else {
                $Ownership_ID = $_POST['Ownership_ID'];
            }
            if (empty($errors)) {
                $deleted = $encoder_con->Delete_Ownership($Ownership_ID);
                if ($deleted) {
                    encoder_redirect_success();
                } else {
                    encoder_place_redirect(Error_Type::DATA_BASE, $Ownership_ID);
                }
            } else {
                encoder_place_redirect(Error_Type::FORM, $Ownership_ID);
            }
        }
    }
}
开发者ID:rogermule,项目名称:afalagi-web,代码行数:31,代码来源:Delete_Ownership.php


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