»Forumlar »SE ? Support »sql_autoinstaller
  https://seditio.com.tr/eski1/forums.php?m=posts&q=1566
          Geri Dön      -      Sayfayı Yazdırmak için tıklayın
Author: kors@n, Posted: 2011-08-12 16:20 GMT.
sql_autoinstaller bu eklenti nas?l ?al???yor yard?mc? olabilirmisiniz
Author: Kaan, Posted: 2011-08-12 23:47 GMT.
yapt?g?n?z eklenti i?ine indirmi? oldugunuz dosyay? ekliyorsunuz eklentinin sql dosyas? varsa
Kod:
$sql_new= "";
sql yolunu yaz?yorsunuz
Kod:
$plug_code ="test";
eklenti ad?n? yaz?yorsunuz
Kod:
sql_autoinstaller.php
ad?n? de?i?tirmiyorsunuz.
Eklentiyi kurarken sql side otomatik y?kleniyor.
Kurulum i?lemi bittikden sonra dosya otomatik olarak siliniyor eklenti i?erisinden.
:
hp]<?php

/* ====================

Seditio - Website engine

Copyright Neocrome

http://www.neocrome.net



[BEGIN_SED]

File=plugins/test/sql_autoinstaller.php

Version=1.0

Updated=2007-jul-1

Type=Plugin

Author=Kilandor

Description=Sql Autoinstaller

Copyright=Kilandor - Seditio Forge - http://www.seditioforge.com/

[END_SED]



[BEGIN_SED_EXTPLUGIN]

Code=test

Part=sql_autoinstaller

File=sql_autoinstaller

Hooks=header.first

Tags=

Order=10

[END_SED_EXTPLUGIN]

==================== */



if (!defined('SED_CODE')) { die('Wrong URL.'); }

if($usr['isadmin'])

    {

        //the Code used to access the plugin

        $plug_code ="test";

        //Only use this if your plugin code is not the same as your path to the files

        $plug_path ="plugins/test/";

        //The section to place all your SQL required for the plugin to be installed when it is ran, If you have more than one Query they MUST end with a ;

        $sql_new= "";

       

        $sql_new = explode(";", $sql_new);

        $sql_new_c = count($sql_new)-2;

        $i=-1;

        while ($i < $sql_new_c)

            {

                $i++;

                $sql_installer = sed_sql_query($sql_new[$i]);

                if($i >= $sql_new_c)

                    {

                        break;

                        exit;

                    }

            }

        if ($sql_installer)

            {

                sed_sql_query("DELETE FROM $db_plugins WHERE pl_code='".$plug_code."' AND pl_part='sql_autoinstaller' LIMIT 1");

                $path = (empty($plug_path)) ? 'plugins/'.$plug_code.'/' : $plug_path;

                unlink($path.'sql_autoinstaller.php');

                $check_cache = sed_cache_clear('sed_plugins');

                sed_log("SQL AutoInstaller Successfully installed SQL for ".$plug_code." - Created by: (c) Kilandor & Seditio Forge - http://www.seditioforge.com/&quo.....adm");

                header("Location: admin.php?m=plug&a=details&pl=".$plug_code."");

            }

    }



?>

 

Powered by SeditioPrint version