<!DOCTYPE html>
<html lang="en">
<meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->
<head>
<title>Add New Articles</title>


<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="#">
<meta name="keywords" content="Admin , Responsive, Landing, Bootstrap, App, Template, Mobile, iOS, Android, apple, creative app">
<meta name="author" content="dell" >

<link rel="icon" href="../assets/images/favicon.png" type="image/x-icon">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,800" rel="stylesheet">

<link rel="stylesheet" type="text/css" href="files/bower_components/bootstrap/css/bootstrap.min.css">

<link rel="stylesheet" type="text/css" href="files/assets/icon/themify-icons/themify-icons.css">

<link rel="stylesheet" type="text/css" href="files/assets/icon/icofont/css/icofont.css">

<link rel="stylesheet" type="text/css" href="files/assets/icon/feather/css/feather.css">

<link rel="stylesheet" type="text/css" href="files/assets/css/style.css">
<link rel="stylesheet" type="text/css" href="files/assets/css/jquery.mCustomScrollbar.css">
</head>
<body>

<div class="theme-loader">
<div class="ball-scale">
<div class='contain'>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
</div>
</div>
</div>

<div id="pcoded" class="pcoded">
<div class="pcoded-overlay-box"></div>
<div class="pcoded-container navbar-wrapper">
<?php require_once "topnav.php"; ?>


<div class="pcoded-main-container">
<div class="pcoded-wrapper">
<?php
    asidenavmenu();
?>
<div class="pcoded-content">
<div class="pcoded-inner-content">

<div class="main-body">
<div class="page-wrapper">

<div class="page-header">
<div class="row align-items-end">
<div class="col-lg-8">
<div class="page-header-title">
<div class="d-inline">
<h4>Articles Setting</h4>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="page-header-breadcrumb">
<ul class="breadcrumb-title">
<li class="breadcrumb-item">
<a href="index-2.html"> <i class="feather icon-home"></i> </a>
</li>
<li class="breadcrumb-item"><a href="#!">Exhibitor Articles Setting</a>
</li>
<li class="breadcrumb-item"><a href="#!">Add New Articles</a>
</li>
</ul>
</div>
</div>
</div>
</div>


<div class="page-body">
<div class="row">
<div class="col-sm-12">

<div class="card">
<div class="card-header">
<h5><?= $formtitle ?></h5>
</div>
<?php
    if($Validation->has_error('pageaddsuccess') != ""){
?>
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<i class="icofont icofont-close-line-circled"></i>
</button>
<strong>Success!</strong> <?=$Validation->has_error('pageaddsuccess')?>
</div>
<?php
    }
?>
<div class="card-block">                  
<form method="post" action="add-exhibitor-articles.php">
<input type="hidden" class="form-control" name="articleid" id="articleid" value="<?=$articleid?>">
<div class="form-group row">
<label class="col-sm-2 col-form-label">Articles Title</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="articletitle" id="articletitle" placeholder="Article Title" value="<?=$articletitle?>">
<?php
    if($Validation->has_error('articletitle') != ""){
?>
    <span class="text text-danger"><?=$Validation->has_error('articletitle')?></span>
<?php
    }
?>    
</div>                     
</div>
     
<div class="form-group row">
<label class="col-sm-2 col-form-label">Company Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="companyname" id="companyname" placeholder="Article Title" value="<?=$companyname?>">
<?php
    if($Validation->has_error('companyname') != ""){
?>
    <span class="text text-danger"><?=$Validation->has_error('companyname')?></span>
<?php
    }
?>
</div>                     
</div>

<div class="form-group row">
<label class="col-sm-2 col-form-label">Articles Desc</label>
<div class="col-sm-10">
<textarea name="articledesc" id="articledesc" class="form-control articledesc ckeditor"><?=$articledesc?></textarea>

<?php
    if($Validation->has_error('articledesc') != ""){
?>
    <span class="text text-danger"><?=$Validation->has_error('articledesc')?></span>
<?php
    }
?>
</div>
</div>

<div class="form-group row">
<label class="col-sm-2 col-form-label">Articles Short Desc</label>
<div class="col-sm-10">
<textarea name="articleshortdesc" id="articleshortdesc" class="form-control articleshortdesc"><?=$articleshortdesc?></textarea>

<?php
    if($Validation->has_error('articleshortdesc') != ""){
?>
    <span class="text text-danger"><?=$Validation->has_error('articleshortdesc')?></span>
<?php
    }
?>
</div>
</div>

<div class="form-group row">
<label class="col-sm-2 col-form-label">Articles Image</label>
<div class="col-sm-10">
<a href="#" name="articleimage" id="articleimage" />Upload Image</a>
<input type="hidden" class="form-control" name="articleimage1" id="articleimage1" value="<?=$articleimage?>" />
<br>
<br>
<div id="mainimagediv">
<?php
    if($articleimage == ''){              
?>          
    <input type="hidden" class="form-control" name="articleimagepath" id="articleimagepath" />
    <img src="<?=DOC_ROOT?>articleimages/blank_img.png" style='width: 10%;height: 10%; padding: 0px 0%;'/>
<?php
    }    
    else
    {
?>         
    <input type="hidden" class="form-control" name="articleimagepath" id="articleimagepath" value="<?=$articleimage?>" />
    <img src="<?=DOC_ROOT?>articleimages/<?=$articleimage?>" style='width: 30%; padding: 0px 0%;'/>
<?php
    }
?>
</div>
</div>
</div>

    <div class="form-group row">
        <label class="col-sm-2 col-form-label">Form Links</label>
        <div class="col-sm-10">     
            <div class="form-check form-check-inline">
                <label class="form-check-label">
                    <input class="form-check-input" type="radio" name="formlinks" id="formlinksyes" value="1" <?php echo ($formlinks == 1) ? 'checked' : ''; ?> > Active
                </label>
            </div>
            <div class="form-check form-check-inline">
                <label class="form-check-label">
                    <input class="form-check-input" type="radio" name="formlinks" id="formlinksno" value="0" <?php echo ($formlinks == 0) ? 'checked' : ''; ?> > InActive
                </label>
            </div>
            <span class="text text-danger"></span>
        </div>
    </div>

    <div class="form-group row">
        <label class="col-sm-2 col-form-label">Publish</label>
        <div class="col-sm-10">
            <div class="form-check form-check-inline">
                <label class="form-check-label">
                    <input class="form-check-input" type="radio" name="status" id="statusyes" value="1" <?php echo ($status == 1) ? 'checked' : ''; ?> > Yes
                </label>
            </div>
            <div class="form-check form-check-inline">
                <label class="form-check-label">
                    <input class="form-check-input" type="radio" name="status" id="statusno" value="0" <?php echo ($status == 0) ? 'checked' : ''; ?> > No
                </label>
            </div>
            <span class="text text-danger"></span>
        </div>
    </div>

<div class="form-group row">
<label class="col-sm-2"></label>
<div class="col-sm-10">
<button type="submit" class="btn btn-primary m-b-0" name="btnaddarticle">Submit</button>
</div>
</div>
</form>
</div>
</div>



</div>
</div>
</div>

</div>
</div>

</div>
</div>
</div>
</div>
</div>
</div>




<script type="7949847dfb016e45bb844ac5-text/javascript" src="files/bower_components/jquery/js/jquery.min.js"></script>
<script type="7949847dfb016e45bb844ac5-text/javascript" src="files/bower_components/jquery-ui/js/jquery-ui.min.js"></script>
<script type="7949847dfb016e45bb844ac5-text/javascript" src="files/bower_components/popper.js/js/popper.min.js"></script>
<script type="7949847dfb016e45bb844ac5-text/javascript" src="files/bower_components/bootstrap/js/bootstrap.min.js"></script>

<script type="7949847dfb016e45bb844ac5-text/javascript" src="files/bower_components/jquery-slimscroll/js/jquery.slimscroll.js"></script>

<script type="7949847dfb016e45bb844ac5-text/javascript" src="files/bower_components/modernizr/js/modernizr.js"></script>
<script type="7949847dfb016e45bb844ac5-text/javascript" src="files/bower_components/modernizr/js/css-scrollbars.js"></script>

<script src="cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js" type="7949847dfb016e45bb844ac5-text/javascript"></script>
<script src="cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js" type="7949847dfb016e45bb844ac5-text/javascript"></script>
<script type="7949847dfb016e45bb844ac5-text/javascript" src="files/assets/pages/form-validation/validate.js"></script>

<script type="7949847dfb016e45bb844ac5-text/javascript" src="files/bower_components/i18next/js/i18next.min.js"></script>
<script type="7949847dfb016e45bb844ac5-text/javascript" src="files/bower_components/i18next-xhr-backend/js/i18nextXHRBackend.min.js"></script>
<script type="7949847dfb016e45bb844ac5-text/javascript" src="files/bower_components/i18next-browser-languagedetector/js/i18nextBrowserLanguageDetector.min.js"></script>
<script type="7949847dfb016e45bb844ac5-text/javascript" src="files/bower_components/jquery-i18next/js/jquery-i18next.min.js"></script>

<!--<script type="7949847dfb016e45bb844ac5-text/javascript" src="files/assets/pages/form-validation/form-validation.js"></script>-->
<script src="files/assets/js/pcoded.min.js" type="7949847dfb016e45bb844ac5-text/javascript"></script>
<script src="files/assets/js/vartical-layout.min.js" type="7949847dfb016e45bb844ac5-text/javascript"></script>
<script src="files/assets/js/jquery.mCustomScrollbar.concat.min.js" type="7949847dfb016e45bb844ac5-text/javascript"></script>
<script type="7949847dfb016e45bb844ac5-text/javascript" src="files/assets/js/script.js"></script>

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-23581568-13" type="7949847dfb016e45bb844ac5-text/javascript"></script>
<script type="7949847dfb016e45bb844ac5-text/javascript">
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-23581568-13');
</script>
<script src="ajax.cloudflare.com/cdn-cgi/scripts/7089c43e/cloudflare-static/rocket-loader.min.js" data-cf-settings="7949847dfb016e45bb844ac5-|49" defer=""></script>
<script src="<?=ADMIN_DIR?>ckeditor/ckeditor.js"></script>
<script src="<?=DOC_ROOT?>js/ajaxupload.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
jQuery(function(){
    new AjaxUpload('#articleimage', {
        action: "<?=DOC_ROOT?>imageUpload/uploadarticles.php", // I disabled uploads in this example for security reaaons
        name: 'myfile',
        onChange: function(){     
            jQuery('#mainimagediv').html('<img src="<?=DOC_ROOT?>articleimages/loader.gif" style="width: 40%;" />');
        },
        onComplete : function(file,response){
            var imagename = response;
            jQuery('#mainimagediv').html('<img src="<?=DOC_ROOT?>articleimages/'+imagename+'" style="width: 40%;" />').show('slow');
            jQuery('#articleimagepath').val(imagename);       
            jQuery('#articleimage1').val(imagename);
        }	
    });
})    

</script>
</body>

</html>
