function displayForm()
{
    $translatorObj = new Translator();
    $page_path = $translatorObj->requestToTranslate();
    if ($page_path) {
        $pageObj = new Page($page_path);
        $pageContent = $pageObj->loadContent();
        ?>
<form action='iwanttotranslate.php' method='post' id='myform'>
<input type='hidden' name='pagepath' id='pagepath' value="<?php 
        echo $page_path;
        ?>
">
<div class='container-fluid'>
<div class='row'>
<div class='col-xs-6'>

<p><b>Page:-</b></p>
<textarea name='pageContent' id='pageContent' rows='20' cols='20' style='width:50%' readonly>
<?php 
        echo $pageContent;
        ?>
</textarea>
</div>
<p><b>Translation:-</b></p>

<script language="javascript">
CreateCustomHindiTextArea("id1","",80,20,true);
</script>

</div>
</div>
<input type='submit' name='submit' value='submit'></input>
<input type='button' name='cancel' value='cancel'></input>
</form>
<?php 
    } else {
        echo 'Hurray!!No pages to translate';
    }
}
Example #2
0
$config['content_path'] = $contentPath;
$config['components_path'] = $componentsPath;
$config['cache_path'] = $cachePath;
// load page-framework
require_once $appPath . DIRECTORY_SEPARATOR . 'page.php';
$page = new Page($config);
if ($page->checkUri()) {
    // is use cache, than check for cache
    if ($page->config['use_cache']) {
        if ($cached = $page->getCacheContentForUri()) {
            echo $cached;
            return;
        }
    }
    // load content
    $content = $page->loadContent();
    // load layout (index)
    $layoutFile = $page->getLayoutFile();
    // load template
    $templateFile = $page->getTemplateFile($content['template']);
    unset($content['template']);
    // merge layout and template
    $merged = $page->mergeLayoutAndTemplate($layoutFile, $templateFile);
    // recursivly replace partials
    $mergedWithPartialFiles = $page->mergePartials($merged);
    // replace components
    $mergedWithComponents = $page->renderComponents($mergedWithPartialFiles);
    // replace contents
    $mergedWithContent = $page->mergeContent($mergedWithComponents, $content);
    // replace contents
    $finally = $page->mergeSite($mergedWithContent);
                dataObject::disconnect($conn);
                die("failed to retrieve:" . $e->getMessage());
            }
            $HPageObj = new Page($row['file_path']);
            $formaction = "verifypage1.php?title=" . urlencode($title) . "&amp;pageno=" . urlencode($pageno) . "&amp;count=" . urlencode($count);
            ?>
	<div class='container-fluid'>
	<form action='<?php 
            echo $formaction;
            ?>
' method='post'>
	<div class='row'>
	<div class='col-xs-6'>
	<textarea name='englishContent' id='englishContent' rows='20' cols='40' readonly>
	<?php 
            echo $EPageObj->loadContent();
            ?>
	</textarea>
	</div>
	
	<div class='col-xs-6'>
	<script language="javascript">
	var val="<?php 
            echo $HPageObj->loadContentTranslated();
            ?>
";
	CreateCustomHindiTextArea("hindiContent",val,80,20,true);
	</script>
	</div>
	</div>
	<div class='row'>