<div class="container-home">
<div class="pt_page_headr">
	<h4 class="page_head"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill-rule="evenodd" fill="currentColor" d="M7 10.25L6.96421 10.25C6.05997 10.25 5.33069 10.25 4.7424 10.3033C4.13605 10.3583 3.60625 10.4746 3.125 10.7524C2.55493 11.0815 2.08154 11.5549 1.7524 12.125C1.47455 12.6063 1.35826 13.1361 1.3033 13.7424C1.24998 14.3307 1.24999 15.06 1.25 15.9642L1.25 15.9642L1.25 16L1.25 16.0358L1.25 16.0358C1.24999 16.94 1.24998 17.6693 1.3033 18.2576C1.35826 18.8639 1.47455 19.3937 1.7524 19.875C2.08154 20.4451 2.55493 20.9185 3.125 21.2476C3.60625 21.5254 4.13605 21.6417 4.7424 21.6967C5.33067 21.75 6.05992 21.75 6.96412 21.75L6.96418 21.75L7 21.75L17 21.75L17.0357 21.75C17.94 21.75 18.6693 21.75 19.2576 21.6967C19.8639 21.6417 20.3937 21.5254 20.875 21.2476C21.4451 20.9185 21.9185 20.4451 22.2476 19.875C22.5254 19.3937 22.6417 18.8639 22.6967 18.2576C22.75 17.6693 22.75 16.94 22.75 16.0358L22.75 16L22.75 15.9642C22.75 15.06 22.75 14.3307 22.6967 13.7424C22.6417 13.1361 22.5254 12.6063 22.2476 12.125C21.9185 11.5549 21.4451 11.0815 20.875 10.7524C20.3937 10.4746 19.8639 10.3583 19.2576 10.3033C18.6693 10.25 17.94 10.25 17.0358 10.25L17 10.25L16 10.25C15.5858 10.25 15.25 10.5858 15.25 11C15.25 11.4142 15.5858 11.75 16 11.75L17 11.75C17.9484 11.75 18.6096 11.7507 19.1222 11.7972C19.6245 11.8427 19.9101 11.9274 20.125 12.0514C20.467 12.2489 20.7511 12.533 20.9486 12.875C21.0726 13.0899 21.1573 13.3755 21.2028 13.8778C21.2493 14.3904 21.25 15.0516 21.25 16C21.25 16.9484 21.2493 17.6096 21.2028 18.1222C21.1573 18.6245 21.0726 18.9101 20.9486 19.125C20.7511 19.467 20.467 19.7511 20.125 19.9486C19.9101 20.0726 19.6245 20.1573 19.1222 20.2028C18.6096 20.2493 17.9484 20.25 17 20.25L7 20.25C6.05158 20.25 5.39041 20.2493 4.87779 20.2028C4.37549 20.1573 4.0899 20.0726 3.875 19.9486C3.53296 19.7511 3.24892 19.467 3.05144 19.125C2.92737 18.9101 2.8427 18.6245 2.79718 18.1222C2.75072 17.6096 2.75 16.9484 2.75 16C2.75 15.0516 2.75072 14.3904 2.79718 13.8778C2.84271 13.3755 2.92737 13.0899 3.05144 12.875C3.24892 12.533 3.53296 12.2489 3.875 12.0514C4.0899 11.9274 4.37549 11.8427 4.87779 11.7972C5.39041 11.7507 6.05158 11.75 7 11.75L8 11.75C8.41421 11.75 8.75 11.4142 8.75 11C8.75 10.5858 8.41421 10.25 8 10.25L7 10.25ZM16.5303 6.46967L12.5303 2.46967C12.2374 2.17678 11.7626 2.17678 11.4697 2.46967L7.46967 6.46967C7.17678 6.76256 7.17678 7.23744 7.46967 7.53033C7.76256 7.82322 8.23744 7.82322 8.53033 7.53033L11.25 4.81066L11.25 16C11.25 16.4142 11.5858 16.75 12 16.75C12.4142 16.75 12.75 16.4142 12.75 16L12.75 4.81066L15.4697 7.53033C15.7626 7.82322 16.2374 7.82322 16.5303 7.53033C16.8232 7.23744 16.8232 6.76256 16.5303 6.46967Z"></path></svg> {{LANG upload_new_video}}</h4>
	<small>{{LANG upload_subhead}}</small>
</div>

<div class="content">
	<div class="pt_upload_vdo">
		<div class="pt_upload_vdo_step step-one-active">
			<div class="line">
				<div class="line_sec"></div>
				<div class="dot one"><span></span><p>{{LANG upload}}</p></div>
				<div class="dot two"><span></span><p>{{LANG upload_details}}</p></div>
				<div class="dot three"><span></span><p>{{LANG upload_elements}}</p></div>
				<div class="dot four"><span></span><p>{{LANG upload_visibility}}</p></div>
			</div>
		</div>
		<div class="pt_upvid_one">
			<div class="upload" data-block="video-drop-zone">
				<div class="content">
					<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 479.992 479.992" fill="currentColor"> <g> <g> <path d="M377.052,114.712L250.556,3.96c-6.048-5.28-15.04-5.28-21.088,0L102.94,114.712c-6.656,5.824-7.328,15.968-1.472,22.624 l21.088,23.968c5.856,6.624,15.936,7.264,22.56,1.472l62.88-55.104v228.32c0,8.832,7.168,16,16,16h32c8.832,0,16-7.168,16-16 v-228.32l62.88,55.104c6.656,5.792,16.736,5.152,22.56-1.472l21.088-24C384.38,130.68,383.708,120.536,377.052,114.712z"/> </g> </g> <g> <g> <path d="M415.996,415.992h-352c-8.832,0-16,7.168-16,16v32c0,8.832,7.168,16,16,16h352c8.832,0,16-7.168,16-16v-32 C431.996,423.16,424.828,415.992,415.996,415.992z"/> </g> </g></svg>
				</div>
				<div>
					<h4>{{LANG darg_drop_to_upload}}</h4>
					<p>{{LANG videos_will_private}}</p>
					<button class="btn btn-main btn_upld_vid_next">{{LANG select_media}}</button>
				</div>
			</div>
			<div class="progress hidden">
				<span class="percent">0%</span>
				<div class="progress_bar_parent">
					<div class="bar upload-progress-bar progress-bar active"></div>
				</div>
				<div class="clear"></div>
				<div class="text-center pt_prcs_vdo"></div>
			</div>
			<?php if ($pt->user->admin == 1) { ?>
				<div class="alert alert-info upload_msg">
					<h4>Just admins can see this message</h4>
					<p>Note: Your server max upload size is: <?php echo ini_get('upload_max_filesize')?>, means you can't upload files that are larger than: <?php echo ini_get('upload_max_filesize')?><br><br> If you want to increase the limit or If you can't upload large files, go to Admin Settings > Settings > Site Settings > Max upload size and increase the value, if you still can't upload large files, please contact your host provider and let them increase the upload limit and max_execution_time.</p>
				</div>
			<?php } ?>
			<?php if ($pt->is_short) { ?>
	            <div class="alert alert-warning">
	               <?php echo(str_replace('{X}', $pt->config->shorts_duration, $pt->all_lang->shorts_maximum_duration_allow)); ?>
	            </div>
	        <?php } ?>
		</div>

		<form action="" method="POST" id="upload-video" style="visibility: hidden;">
			<input type="file" name="video" accept="video/*" class="upload-video-file">
			<?php if ($pt->is_short) { ?>
            <input type="hidden" name="is_short" id="is_short" value="yes">
            <?php } ?>
		</form>

		<div id="upload-form">
			<form action="" class="form-horizontal pt_forms" method="POST">
				<div class="pt_upvid_two" style="display: none;">
					<div class="row pt_upload_vdo_row">
						<div class="col-md-4">
							<div class="pt_upload_vdo_preview">
								<div class="pt_upload_vdo_thumb">
									<div id="image-renderer">
										<svg enable-background="new 0 0 510 510" height="512" viewBox="0 0 510 510" width="512" xmlns="http://www.w3.org/2000/svg"><linearGradient id="SVGID_1_" gradientTransform="matrix(.994 .11 -.11 .994 -28.962 -29.776)" gradientUnits="userSpaceOnUse" x1="172.48" x2="497.848" y1="110.639" y2="436.007"><stop offset="0" stop-color="#ffa936"/><stop offset=".4112" stop-color="#ff8548"/><stop offset=".7781" stop-color="#ff6c54"/><stop offset="1" stop-color="#ff6359"/></linearGradient><linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="490.487" x2="466.43" y1="159.015" y2="164.322"><stop offset="0" stop-color="#f82814" stop-opacity="0"/><stop offset="1" stop-color="#c0272d"/></linearGradient><linearGradient id="lg1"><stop offset="0" stop-color="#cdec7a"/><stop offset=".2157" stop-color="#b0e995"/><stop offset=".5613" stop-color="#87e4bb"/><stop offset=".8347" stop-color="#6ee1d2"/><stop offset="1" stop-color="#65e0db"/></linearGradient><linearGradient id="SVGID_3_" gradientTransform="matrix(.983 -.185 .185 .983 55.608 42.369)" gradientUnits="userSpaceOnUse" x1="15.52" x2="340.888" xlink:href="#lg1" y1="104.705" y2="430.073"/><linearGradient id="lg2"><stop offset="0" stop-color="#cdec7a" stop-opacity="0"/><stop offset=".2354" stop-color="#9ad57d" stop-opacity=".235"/><stop offset=".6035" stop-color="#51b482" stop-opacity=".604"/><stop offset=".8679" stop-color="#239f85" stop-opacity=".868"/><stop offset="1" stop-color="#119786"/></linearGradient><linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="491.682" x2="450.637" xlink:href="#lg2" y1="256.546" y2="256.546"/><linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="176.731" x2="176.731" xlink:href="#lg2" y1="466.917" y2="442.601"/><linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="88.264" x2="413.632" y1="111.753" y2="437.121"><stop offset="0" stop-color="#f8f6fb"/><stop offset="1" stop-color="#efdcfb"/></linearGradient><linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="112.768" x2="430.112" y1="101.155" y2="514.021"><stop offset="0" stop-color="#18cefb"/><stop offset=".2969" stop-color="#2bb9f9"/><stop offset=".7345" stop-color="#42a0f7"/><stop offset="1" stop-color="#4a97f6"/></linearGradient><linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="75.588" x2="214.616" y1="316.53" y2="497.406"><stop offset="0" stop-color="#cdec7a"/><stop offset=".2154" stop-color="#b0e995" stop-opacity=".784"/><stop offset=".5604" stop-color="#87e4bb" stop-opacity=".439"/><stop offset=".8334" stop-color="#6ee1d2" stop-opacity=".165"/><stop offset=".9985" stop-color="#65e0db" stop-opacity="0"/></linearGradient><linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="198.822" x2="366.499" xlink:href="#lg1" y1="288.474" y2="506.622"/><linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="117.242" x2="171.618" y1="131.922" y2="202.666"><stop offset="0" stop-color="#ffd945"/><stop offset=".3043" stop-color="#ffcd3e"/><stop offset=".8558" stop-color="#ffad2b"/><stop offset="1" stop-color="#ffa325"/></linearGradient><g><path d="m426.926 470.539-386.877-42.878c-18.601-2.061-32.008-18.811-29.947-37.412l35.559-320.841c2.062-18.601 18.812-32.009 37.412-29.947l386.877 42.878c18.601 2.062 32.009 18.812 29.947 37.412l-35.559 320.841c-2.061 18.601-18.811 32.009-37.412 29.947z" fill="url(#SVGID_1_)"/><path d="m499.897 119.752-14.02 126.534-31.162-165.634 15.241 1.688c18.595 2.058 32 18.806 29.941 37.412z" fill="url(#SVGID_2_)"/><path d="m482.373 410.94-382.536 71.964c-18.392 3.46-36.107-8.645-39.567-27.037l-59.68-317.241c-3.46-18.392 8.645-36.107 27.037-39.567l382.536-71.964c18.392-3.46 36.107 8.645 39.567 27.037l59.68 317.241c3.46 18.393-8.645 36.108-27.037 39.567z" fill="url(#SVGID_3_)"/><path d="m457.896 97.546v317.999l24.476-4.605c18.392-3.46 30.497-21.175 27.037-39.567z" fill="url(#SVGID_4_)"/><path d="m58.45 446.187 1.821 9.68c3.46 18.392 21.175 30.497 39.567 27.037l195.175-36.717z" fill="url(#SVGID_5_)"/><g><path d="m424.01 448.166h-389.245c-18.715 0-33.886-15.171-33.886-33.886v-322.806c0-18.715 15.171-33.886 33.886-33.886h389.245c18.715 0 33.886 15.171 33.886 33.886v322.806c0 18.715-15.171 33.886-33.886 33.886z" fill="url(#SVGID_6_)"/><path d="m392.279 416.326h-325.782c-15.663 0-28.361-12.698-28.361-28.361v-270.175c0-15.663 12.698-28.361 28.361-28.361h325.782c15.663 0 28.361 12.698 28.361 28.361v270.175c0 15.663-12.698 28.361-28.361 28.361z" fill="url(#SVGID_7_)"/><g><path d="m252.069 416.326h-185.567c-15.666 0-28.37-12.694-28.37-28.359v-44.29l47.082-57.228c15.538-18.903 44.46-18.903 60.009 0l29.315 35.64z" fill="url(#SVGID_8_)"/><path d="m420.643 316.75v71.217c0 15.666-12.704 28.359-28.37 28.359h-295.268l77.532-94.237 95.246-115.783c15.538-18.892 44.471-18.892 60.009 0z" fill="url(#SVGID_9_)"/></g><circle cx="137.225" cy="157.919" fill="url(#SVGID_10_)" r="40.219"/></g></g></svg>
									</div>
								</div>
								<!--<p>{{LANG video_link}}<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="20" viewBox="0 0 24 24" width="20" fill="currentColor"><g><rect fill="none" height="24" width="24"/></g><g><path d="M15,20H5V7c0-0.55-0.45-1-1-1h0C3.45,6,3,6.45,3,7v13c0,1.1,0.9,2,2,2h10c0.55,0,1-0.45,1-1v0C16,20.45,15.55,20,15,20z M20,16V4c0-1.1-0.9-2-2-2H9C7.9,2,7,2.9,7,4v12c0,1.1,0.9,2,2,2h9C19.1,18,20,17.1,20,16z M18,16H9V4h9V16z"/></g></svg></p>
								<a href="http://example.com">http://example.com</a>-->
								<p>{{LANG file_name}}</p>
								<div class="file_name"></div>
							</div>
							<p class="pt_vdo_upld_dn"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM9.29 16.29L5.7 12.7c-.39-.39-.39-1.02 0-1.41.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0z"/></svg> {{LANG no_video_issue}}</p>
						</div>
						<div class="col-md-8">
							<div class="pp_mat_input">
								<input id="title" name="title" type="text" placeholder="{{LANG video_title}}" required>
								<label for="title">{{LANG video_title}}</label>
								<span class="help-block">{{LANG video_title_help}}</span>
							</div>
							<div class="pp_mat_input">
								<textarea name="description" id="description" cols="30" rows="5" class="description" required></textarea>
								<label for="description">{{LANG video_descritpion}}</label>
							</div>
							<div class="pt_uv_thumbs">
								<h5>{{LANG thumbnail}}</h5>
								<p>{{LANG upload_video_thumb_desc}}</p>
								<div class="pt_uv_thumbs_innr">
									<div class="upload-product-image" onclick="document.getElementById('thumbnail').click(); return false">
										<div class="upload-image-content">
											<div><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.9436 2.25H11H12C12.4142 2.25 12.75 2.58579 12.75 3C12.75 3.41421 12.4142 3.75 12 3.75H11C9.09318 3.75 7.73851 3.75159 6.71085 3.88976C5.70476 4.02502 5.12511 4.27869 4.7019 4.7019C4.27869 5.12511 4.02502 5.70476 3.88976 6.71085C3.75159 7.73851 3.75 9.09318 3.75 11V13C3.75 14.7777 3.75138 16.0755 3.86353 17.0758L4.46967 16.4697L6.14124 14.7981L6.17801 14.7613C6.81331 14.126 7.34307 13.5962 7.82019 13.2322C8.32379 12.8479 8.85587 12.5784 9.5 12.5784C10.1441 12.5784 10.6762 12.8479 11.1798 13.2322C11.6569 13.5962 12.1867 14.126 12.822 14.7613L12.822 14.7613L12.8588 14.7981L14.0003 15.9396C14.496 15.4467 14.9261 15.0329 15.3202 14.7322C15.8238 14.3479 16.3559 14.0784 17 14.0784C17.6441 14.0784 18.1762 14.3479 18.6798 14.7322C19.128 15.0741 19.6227 15.5624 20.2077 16.1471C20.2493 15.2994 20.25 14.2727 20.25 13V12C20.25 11.5858 20.5858 11.25 21 11.25C21.4142 11.25 21.75 11.5858 21.75 12V13V13.0564V13.0565C21.75 14.8942 21.75 16.3498 21.5969 17.489C21.4392 18.6614 21.1071 19.6104 20.3588 20.3588C19.6104 21.1071 18.6614 21.4392 17.489 21.5969C16.3498 21.75 14.8942 21.75 13.0565 21.75H13.0564H13H11H10.9436H10.9435C9.1058 21.75 7.65018 21.75 6.51098 21.5969C5.33856 21.4392 4.38961 21.1071 3.64124 20.3588C2.89288 19.6104 2.56076 18.6614 2.40313 17.489C2.24997 16.3498 2.24998 14.8942 2.25 13.0564V13V11V10.9436C2.24998 9.10582 2.24997 7.65019 2.40313 6.51098C2.56076 5.33855 2.89288 4.38961 3.64124 3.64124C4.38961 2.89288 5.33856 2.56076 6.51098 2.40313C7.65019 2.24997 9.10582 2.24998 10.9436 2.25ZM4.7019 19.2981C4.54709 19.1433 4.41496 18.9675 4.30302 18.7576L5.53033 17.5303L7.2019 15.8588C7.88356 15.1771 8.34258 14.7203 8.73006 14.4247C9.10023 14.1423 9.3157 14.0784 9.5 14.0784C9.6843 14.0784 9.89977 14.1423 10.2699 14.4247C10.6574 14.7203 11.1164 15.1771 11.7981 15.8588L13.4697 17.5303L16.1471 20.2077C15.2994 20.2493 14.2727 20.25 13 20.25H11C9.09318 20.25 7.73851 20.2484 6.71085 20.1102C5.70476 19.975 5.12511 19.7213 4.7019 19.2981ZM19.2981 19.2981C18.9917 19.6045 18.6034 19.822 18.0307 19.97L18.0303 19.9697L15.0611 17.0004C15.5523 16.5123 15.9149 16.1652 16.2301 15.9247C16.6002 15.6423 16.8157 15.5784 17 15.5784C17.1843 15.5784 17.3998 15.6423 17.7699 15.9247C18.1574 16.2203 18.6164 16.6771 19.2981 17.3588L19.9697 18.0303L19.97 18.0307C19.822 18.6034 19.6045 18.9917 19.2981 19.2981ZM18.5303 2.46967C18.2374 2.17678 17.7626 2.17678 17.4697 2.46967L14.9697 4.96967C14.6768 5.26256 14.6768 5.73744 14.9697 6.03033C15.2626 6.32322 15.7374 6.32322 16.0303 6.03033L17.25 4.81066V9C17.25 9.41421 17.5858 9.75 18 9.75C18.4142 9.75 18.75 9.41421 18.75 9V4.81066L19.9697 6.03033C20.2626 6.32322 20.7374 6.32322 21.0303 6.03033C21.3232 5.73744 21.3232 5.26256 21.0303 4.96967L18.5303 2.46967Z" fill="currentColor"/></svg>{{LANG upload}} {{LANG thumbnail}}</div>
										</div>
									</div>
									<div id="vidimage-holder"></div>
								</div>
								<input id="thumbnail" name="thumbnail" type="file" class="hidden" accept="image/*">
							</div>
							<button type="button" class="btn btn-main btn_upld_vid_next next_step_button">{{LANG next_step}}</button>
						</div>
					</div>
				</div>
				<div class="pt_upvid_three" style="display: none;">
					<?php if (PT_IsAdmin() && $pt->config->movies_videos == 'on' && !$pt->is_short) { ?>
						<p class="pt_upload_vdo_type">{{LANG what_you_uploading}}</p>
						<div class="pt_upload_vdo_type_radio">
							<label>
								<input type="radio" name="is_movie" value="0" onchange="ShowForm(this)">
								<div class="pt_upload_vdo_type_radio_innr vdo">
									<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path fill="currentColor" d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l2.29 2.29c.63.63 1.71.18 1.71-.71V8.91c0-.89-1.08-1.34-1.71-.71L17 10.5z"/></svg>
									<b>{{LANG video}}</b>
									<p>{{LANG upload_normal_video_text}}</p>
								</div>
							</label>
							<label>
								<input type="radio" name="is_movie" value="1" onchange="ShowForm(this)">
								<div class="pt_upload_vdo_type_radio_innr">
									<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path fill="currentColor" d="M18 4v1h-2V4c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v1H6V4c0-.55-.45-1-1-1s-1 .45-1 1v16c0 .55.45 1 1 1s1-.45 1-1v-1h2v1c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-1h2v1c0 .55.45 1 1 1s1-.45 1-1V4c0-.55-.45-1-1-1s-1 .45-1 1zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"/></svg>
									<b>{{LANG movie}}</b>
									<p>{{LANG upload_normal_movie_text}}</p>
								</div>
							</label>
						</div>
						<!--<p class="pt_vdo_upld_dn"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM9.29 16.29L5.7 12.7c-.39-.39-.39-1.02 0-1.41.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0z"/></svg> Element Info</p>--><br>
					<?php } else { ?>
						<p class="pt_upload_vdo_type">{{LANG what_you_uploading}}</p>
						<div class="pt_upload_vdo_type_radio">
							<label>
								<input type="radio" name="is_movie" value="0" onchange="ShowForm(this)">
								<div class="pt_upload_vdo_type_radio_innr vdo">
									<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path fill="currentColor" d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l2.29 2.29c.63.63 1.71.18 1.71-.71V8.91c0-.89-1.08-1.34-1.71-.71L17 10.5z"/></svg>
									<b>{{LANG video}}</b>
									<p>{{LANG upload_normal_stock_video_text}}</p>
								</div>
							</label>
						</div>
						<!--<p class="pt_vdo_upld_dn"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM9.29 16.29L5.7 12.7c-.39-.39-.39-1.02 0-1.41.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0z"/></svg> Element Info</p>--><br>
					<?php } ?>
					<div class="movie_fields col-md-12" style="display: none;">
						<?php if (PT_IsAdmin() && $pt->config->movies_videos == 'on' && !$pt->is_short) { ?>
							<div class="row">
								<div class="col-md-6">
									<div class="pp_mat_input">
										<select class="selectpicker show-menu-arrow" id="country" name="country">
											<?php foreach ($countries_name as $key => $value) : ?>
												<option value="<?php echo $key; ?>"><?php echo $value; ?></option>
											<?php endforeach; ?>
										</select>
									</div>
									<div class="pp_mat_input">
										<select class="selectpicker show-menu-arrow" id="quality" name="quality">
											<option value="" disabled>{{LANG quality}}</option>
											<option value="CAMRip">CAMRip</option>
											<option value="TS">TS</option>
											<option value="VHSRip">VHSRip</option>
											<option value="WP">WP</option>
											<option value="SCR (VHSScr)">SCR (VHSScr)</option>
											<option value="DVDScr">DVDScr</option>
											<option value="TC">TC</option>
											<option value="LDRip">LDRip</option>
											<option value="TVRip">TVRip</option>
											<option value="SATRip">SATRip</option>
											<option value="DVBRip">DVBRip</option>
											<option value="DTVRip">DTVRip</option>
											<option value="DVD">DVD</option>
											<option value="HDRip">HDRip</option>
											<option value="WEB-DL">WEB-DL</option>
											<option value="HD-TV">HD-TV</option>
											<option value="HD DVD">HD DVD</option>
										</select>
									</div>
									<?php if (PT_IsAdmin() && $pt->config->movies_videos == 'on') { ?>
										<?php if ($pt->config->trailer_system == 'on') { ?>
											<div class="pp_mat_input">
												<div class="movie-file-input">
													<input type="file" class="trailer" id="trailer" name="trailer" accept="video/*">
													<label>{{LANG upload_trailer}}</label>
													<span class="button">{{LANG choose_file}}</span>
													<span class="mlabel" data-js-label>{{LANG click_2choose_file}}</span>
												</div>
												<span class="help-block">{{LANG upload_video_trailer_desc}}</span>
											</div>
										<?php } ?>
									<?php } ?>
								</div>
								<div class="col-md-6">
									<div class="pp_mat_input">
										<input id="stars" name="stars" type="text" placeholder="{{LANG stars}} {{LANG by_comma}}">
										<label for="stars">{{LANG stars}}</label>
									</div>
									<div class="pp_mat_input">
										<input id="producer" name="producer" type="text" placeholder="{{LANG producer}}">
										<label for="producer">{{LANG producer}}</label>
									</div>
									<div class="pp_mat_input">
										<input id="release" name="release" type="number" placeholder="{{LANG release}}" min="1910" max="<?php echo date('Y') ?>">
										<label for="release">{{LANG release}}</label>
									</div>
									<div class="pp_mat_input">
										<input type="number" id="rating" name="rating" min="1" max="10" step="0.1">
										<label for="rating">{{LANG rating}} {{LANG rating_btween}}</label>
									</div>
									<?php if ((($pt->config->usr_v_mon == 'on' && $pt->config->user_mon_approve == 'off') || ($pt->config->usr_v_mon == 'on' && $pt->config->user_mon_approve == 'on' && $pt->user->monetization == '1')) && $pt->config->sell_videos_system == 'on') { ?>
										<div class="pp_mat_input">
											<input id="buy_price" name="buy_price" type="text" placeholder="{{LANG set_p_v}}">
											<label for="rating">{{LANG set_p_v}}</label>
											<span class="help-block"><?php if($pt->config->admin_com_sell_videos > 0 && $pt->config->com_type != 1){ ?>{{LANG p_m_than_}} <?php echo($pt->config->admin_com_sell_videos) ?><?php }?></span>
										</div>
									<?php } ?>
									<?php if ((($pt->config->usr_v_mon == 'on' && $pt->config->user_mon_approve == 'off') || ($pt->config->usr_v_mon == 'on' && $pt->config->user_mon_approve == 'on' && $pt->user->monetization == '1')) && $pt->config->rent_videos_system == 'on') { ?>
										<div class="pp_mat_input">
											<input id="mySingleFieldTags_movie" name="movie_rent_price" type="text" placeholder="{{LANG rent_price}}">
											<label for="movie_rent_price">{{LANG rent_price}}</label>
											<span class="help-block"><?php if($pt->config->admin_com_rent_videos > 0){ ?>{{LANG p_m_than_}} {{CURRENCY}}<?php echo($pt->config->com_type == 0 ? $pt->config->admin_com_rent_videos : 0) ?> <?php }?></span>
										</div>
									<?php } ?>
								</div>
							</div>
						<?php } ?>
					</div>
					<div class="clear"></div>
					<?php if (!$pt->is_short) { ?>

					<div class="video_fields col-md-12" style="display: none;">
						<?php if ($pt->config->geo_blocking == 'on') { ?>
							<div class="pp_mat_input" id="geo_blocking">
								<select class="selectpicker show-menu-arrow" multiple name="continents-list[]" title="{{LANG geo_blocking}}" data-actions-box="true">
									<?php foreach ($pt->continents as $key => $name): ?>
										<option value="<?php echo($name); ?>"><?php echo($name); ?></option>
									<?php endforeach; ?>
								</select>
							</div>
						<?php } ?>
						<?php if (($pt->config->sell_videos_system == 'on' && $pt->config->who_sell == 'pro_users' && ($pt->user->is_pro || $pt->user->admin)) || ($pt->config->sell_videos_system == 'on' && $pt->config->who_sell == 'users') ) { ?>
						<?php if ((($pt->config->usr_v_mon == 'on' && $pt->config->user_mon_approve == 'off') || ($pt->config->usr_v_mon == 'on' && $pt->config->user_mon_approve == 'on' && $pt->user->monetization == '1'))) { ?>
							<div class="pp_mat_input">
								<input name="set_p_v" type="text" placeholder=" " autocomplete="off">
								<label for="set_p_v">{{LANG set_p_v}}</label>
								<span class="help-block"><?php if($pt->config->admin_com_sell_videos > 0 && $pt->config->com_type != 1){ ?>{{LANG p_m_than_}} <?php echo($pt->config->admin_com_sell_videos) ?><?php }?></span>
							</div>
						<?php } ?>
						<?php } ?>
						<?php if (($pt->config->rent_videos_system == 'on' && $pt->config->who_sell == 'pro_users' && ($pt->user->is_pro || $pt->user->admin)) || ($pt->config->rent_videos_system == 'on' && $pt->config->who_sell == 'users') ) { ?>
						<?php if ((($pt->config->usr_v_mon == 'on' && $pt->config->user_mon_approve == 'off') || ($pt->config->usr_v_mon == 'on' && $pt->config->user_mon_approve == 'on' && $pt->user->monetization == '1'))) { ?>
							<div class="pp_mat_input">
								<input name="rent_price" type="text" placeholder=" ">
								<label for="rent_price">{{LANG rent_price}}</label>
								<span class="help-block"><?php if($pt->config->admin_com_rent_videos > 0){ ?>{{LANG p_m_than_}} {{CURRENCY}}<?php echo($pt->config->com_type == 0 ? $pt->config->admin_com_rent_videos : 0) ?> <?php }?></span>
							</div>
						<?php } ?>
						<?php } ?>
					</div>
				<?php } ?>
					<div class="clear"></div>
					<div class="col-md-12 vid_extra_opts" style="display: none;">
						<?php if (!$pt->is_short) { ?>
						<?php if ($pt->config->restrict_embedding_system == 'on') { ?>
							<div class="pp_mat_input">
								<select class="selectpicker show-menu-arrow" name="embedding" id="embedding">
									<option value="" disabled>{{LANG restrict_embedding}}</option>
									<option value="no">{{LANG no}}</option>
									<option value="yes">{{LANG yes}}</option>
								</select>
							</div>
						<?php } ?>
						<?php if ((($pt->config->usr_v_mon == 'on' && $pt->config->user_mon_approve == 'off') || ($pt->config->usr_v_mon == 'on' && $pt->config->user_mon_approve == 'on' && $pt->user->monetization == '1')) && $pt->user->video_mon == '1') { ?>
							<div class="form-group">
								<label>{{LANG monetization}}</label>
								<div class="pt_vdo_cstm_radio">
									<input type="radio" id="monetization1" name="monetization" value="1" checked>
									<label for="monetization1">{{LANG enable}}</label>
								</div>
								<div class="pt_vdo_cstm_radio">
									<input type="radio" id="monetization0" name="monetization" value="0">
									<label for="monetization0">{{LANG disable}}</label>
								</div>
							</div>
						<?php } ?>
						<?php } ?>
						<button type="button" class="btn btn-main btn_upld_vid_next next_step_button2">{{LANG next_step}}</button>&nbsp;&nbsp;
						<button type="button" class="btn btn-default btn_upld_vid_next" onclick="$('.pt_upvid_two').slideDown();	$('.pt_upvid_three').slideUp();$('.pt_upload_vdo_step').removeClass('step-three-active');">{{LANG go_back}}</button>
					</div>
					<div class="clear"></div>

				</div>
				<div class="pt_upvid_four" style="display: none;">
					<div class="row pt_upload_vdo_row">
						<div class="col-md-12">
							<div class="movie_fields" style="display: none;">
								<?php if (PT_IsAdmin() && $pt->config->movies_videos == 'on' && !$pt->is_short) { ?>
									<div class="pp_mat_input">
										<select id="category" class="selectpicker show-menu-arrow" name="category">
											<option value="" disabled>{{LANG category}}</option>
											<?php foreach ($pt->movies_categories as $cat_id => $category): ?>
												<option value="<?php echo $cat_id;?>"><?php echo $category;?></option>
											<?php endforeach;?>
										</select>
									</div>
								<?php } ?>
							</div>
							<div class="video_fields" style="display: none;">
								<?php if (!$pt->is_short) { ?>
								<div class="pp_mat_input">
									<select name="category_id" id="category_id" class="selectpicker show-menu-arrow" title="{{LANG category}}">
										<?php foreach($pt->categories as $key => $category) {?>
											<option value="<?php echo $key?>"><?php echo $category?></option>
										<?php } ?>
									</select>
									<span class="help-block">{{LANG add_category_to_your_video}}</span>
								</div>
								<div class="pp_mat_input" <?php if (empty($pt->sub_categories_array["'1'"])) { ?> style="display: none;"<?php } ?> id="sub_category_div">
									<select name="sub_category_id" class="selectpicker show-menu-arrow" id="sub_category_id">
										<option value="" disabled>{{LANG sub_category}}</option>
										<?php echo $pt->sub_categories_array["'1'"]; ?>
									</select>
									<span class="help-block">{{LANG add_sub_category_to_your_video}}</span>
								</div>
							<?php } ?>
								<div class="pp_mat_input">
									<input id="mySingleFieldTags" name="tags" type="text" placeholder="{{LANG tags}}">
									<label for="tags">{{LANG tags}}</label>
									<span class="help-block">{{LANG add_tags_to_your_video}}</span>
								</div>
								<div class="row">
									<div class="col-md-6">
										<div class="form-group">
											<label>{{LANG privacy}}</label>
											<span class="help-block mb-15" style="opacity: 1;margin-top: 0;">{{LANG choose_the_video_privacy}}</span>
											<div class="pt_vdo_cstm_radio">
												<input type="radio" id="privacy0" name="privacy" value="0" checked>
												<label for="privacy0">{{LANG public}}</label>
											</div>
											<div class="pt_vdo_cstm_radio">
												<input type="radio" id="privacy1" name="privacy" value="1">
												<label for="privacy1">{{LANG private}}</label>
											</div>
											<div class="pt_vdo_cstm_radio">
												<input type="radio" id="privacy2" name="privacy" value="2">
												<label for="privacy2">{{LANG unlisted}}</label>
											</div>
											<div class="pt_vdo_cstm_radio">
												<input type="radio" id="privacy3" name="privacy" value="3">
												<label for="privacy3">{{LANG scheduled}}</label>
											</div>
										</div>
									</div>
									<?php if (!$pt->is_short) { ?>
									<div class="col-md-6">
										<div class="form-group">
											<label>{{LANG age_restriction}}</label>
											<div class="pt_vdo_cstm_radio">
												<input type="radio" id="age_restriction0" name="age_restriction" value="1" checked>
												<label for="age_restriction0">{{LANG all_ages}}</label>
											</div>
											<div class="pt_vdo_cstm_radio">
												<input type="radio" id="age_restriction1" name="age_restriction" value="2">
												<label for="age_restriction1">{{LANG only_18}}</label>
											</div>
										</div>
									</div>
								<?php } ?>
								</div>
								<div class="row scheduled hidden">
									<div class="col-md-6">
										<div class="pp_mat_input">
											<input id="date" name="date" type="text" placeholder="{{LANG publication_date}}">
											<label for="date">{{LANG publication_date}} {{LANG utc_timezone}}</label>
										</div>
									</div>
									<div class="col-md-6">
										<div class="pp_mat_input">
											<select name="hour" id="hour">
												<?php foreach ($pt->config->hours as $key => $value) { ?>
													<option value="<?php echo($key) ?>"><?php echo $value; ?></option>
												<?php } ?>
											</select>
										</div>
									</div>
								</div>
							</div>
							<button type="submit" id="submit-btn" class="btn btn-main btn_upld_vid_next" disabled>{{LANG publish}}</button>&nbsp;&nbsp;
							<button type="button" class="btn btn-default btn_upld_vid_next" onclick="$('.pt_upvid_three').slideDown();	$('.pt_upvid_four').slideUp();$('.pt_upload_vdo_step').removeClass('step-four-active');">{{LANG go_back}}</button>
						</div>
					</div>
				</div>
				<input type="hidden" name="video-location" id="video-location" value="">
				<input type="hidden" name="uploaded_id" id="uploaded_id" value="">
				<?php if ($pt->is_short) { ?>
               <input type="hidden" name="is_short" value="yes">
               <?php } ?>
			</form>
		</div>
		<div class="clear"></div>
	</div>
	<div class="clear"></div>
</div>
</div>

<style type="text/css">
	.border_class{border: 1px solid red !important;}
</style>
<script>
<?php if ($pt->config->trailer_system == 'on') { ?>
var inputs = document.querySelectorAll('.movie-file-input')

for (var i = 0, len = inputs.length; i < len; i++) {
  customInput(inputs[i])
}

function customInput (el) {
  const fileInput = el.querySelector('.movie-file-input [type="file"]')
  const label = el.querySelector('[data-js-label]')

  fileInput.onchange =
  fileInput.onmouseout = function () {
    if (!fileInput.value) return

    var value = fileInput.value.replace(/^.*[\\\/]/, '')
    label.innerText = value
  }
};
<?php } ?>

	$(document).on('change', '[name="privacy"]', function(event) {
      event.preventDefault();
      if ($(this).val() == 3) {
         $('.scheduled').removeClass('hidden');
      }
      else{
         $('.scheduled').addClass('hidden');
      }
   });
   $(document).ready(function() {
   $( "#date" ).datepicker({ dateFormat: 'yy-mm-dd', minDate: 'today',prevText: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z" /></svg>',nextText: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" /></svg>'});
   });
	var el = $(".description").emojioneArea({
		pickerPosition: "bottom",
	    tonesStyle: "radio",
	    events: {
	     	keyup: function (editor, event) {
		    }
	    },
	    filters: {
	        flags : false,
	        objects : false,
	        travel_places : false,
	        activity : false
	    }
	});
	var el2 = $(".move_description").emojioneArea({
		pickerPosition: "bottom",
	    tonesStyle: "radio",
	    events: {
	     	keyup: function (editor, event) {
		    }
	    },
	    filters: {
	        flags : false,
	        objects : false,
	        travel_places : false,
	        activity : false
	    }
	});

function ShowForm(self) {
	$(".vid_extra_opts").show();
	if ($(self).val() == 1) {
		$(".video_fields").hide();
		$(".movie_fields").show();
	}
	else if($(self).val() == 0){
		$(".video_fields").show();
		$(".movie_fields").hide();
	}
}

$('.selectpicker').selectpicker({});
<?php
$js_array = json_encode($pt->sub_categories_array);
echo "var sub_categories_array = ". $js_array . ";\n";
?>
$(document).on('change', '#category_id', function(event) {
   event.preventDefault();
   id = $(this).val();
   if (typeof(sub_categories_array["'"+id+"'"]) == 'undefined') {
   	$('#sub_category_div').hide();
    $('#sub_category_id').html('');
   }
   else{
   	$('#sub_category_div').show();
    $('#sub_category_id').html(sub_categories_array["'"+id+"'"]);
  }
  $('.selectpicker').selectpicker('refresh');
});


$(document).ready(function() {
	$(document).on('click', '.next_step_button', function(event) {
   		event.preventDefault();
   		if ($('#title').val() != '' && $('#description').val() != '' && $('#vidimage-holder').html().length != 0) {
   			<?php if ($pt->is_short) { ?>
   			$(".video_fields").show();
		    $(".movie_fields").hide();
   			$('.pt_upvid_two').slideUp();
   			$('.pt_upvid_three').slideUp();
			$('.pt_upvid_four').slideDown();
			$('.pt_upload_vdo_step').addClass('step-four-active');
			<?php }else{ ?>
				$('.pt_upvid_two').slideUp();
		   		$('.pt_upvid_three').slideDown();
		   		$('.pt_upload_vdo_step').addClass('step-three-active');
		   	<?php } ?>
   		}
   		else{
   			if ($('#title').val() == '') {
   				$('#title').addClass('border_class');
   			}
   			if ($('#description').val() == '') {
   				$('.description').addClass('border_class');
   			}
   			if ($('#vidimage-holder').html().length == 0) {
   				$('.upload-image-content').addClass('border_class');
   			}
   		}
   	});
   	$(document).on('click', '.next_step_button2', function(event) {
   		event.preventDefault();
   		if ($(".movie_fields").is(":visible")) {
   			if ($('#stars').val() != '' && $('#producer').val() != '' && $('#release').val() != '' && $('#rating').val() != '' && $('#country').val() != 0) {
   				$('.pt_upvid_three').slideUp();
   				$('.pt_upvid_four').slideDown();
   				$('.pt_upload_vdo_step').addClass('step-four-active');
   			}
   			else{
   				if ($('#stars').val() == '') {
	   				$('#stars').addClass('border_class');
	   			}
   				if ($('#producer').val() == '') {
	   				$('#producer').addClass('border_class');
	   			}
   				if ($('#release').val() == '') {
	   				$('#release').addClass('border_class');
	   			}
   				if ($('#rating').val() == '') {
	   				$('#rating').addClass('border_class');
	   			}
   				if ($('#country').val() == 0) {
	   				$('#country').parent().addClass('border_class');
	   			}
   			}
   		}
   		else{
   			$('.pt_upvid_three').slideUp();
			$('.pt_upvid_four').slideDown();
			$('.pt_upload_vdo_step').addClass('step-four-active');
   		}
   	});
	$("#thumbnail").on('change', function() {
	//Get count of selected files
	var product_countFiles = $(this)[0].files.length;
	var product_imgPath = $(this)[0].value;
	var extn = product_imgPath.substring(product_imgPath.lastIndexOf('.') + 1).toLowerCase();
	var product_image_holder = $("#vidimage-holder");
	product_image_holder.empty();
	if (extn == "gif" || extn == "png" || extn == "jpg" || extn == "jpeg") {
		if (typeof(FileReader) != "undefined") {
		//loop for each file selected for uploaded.
		for (var i = 0; i < product_countFiles; i++)
		{
			var product_reader = new FileReader();
			product_reader.onload = function(e) {
				$("<img />", {
                    "src": e.target.result,
                    "class": "thumb-image",
					"onclick": 'document.getElementById("image-renderer").innerHTML = "<img src='+e.target.result+'>"'
                  }).appendTo(product_image_holder);
                }
                product_image_holder.show();
                product_reader.readAsDataURL($(this)[0].files[i]);
              }
            } else {
              product_image_holder.html("<p>This browser does not support FileReader.</p>");
            }
         }
	});
});

function SelectThis(event) {
	$('#image-renderer').html(this);
}

$(function () {
	$("#mySingleFieldTags").tagit({
		allowSpaces: true
	});
	var bar         = $('.bar');
   var percent     = $('.percent');
   var prcsvdo		= $('.pt_prcs_vdo');
   var is_uploaded = false;

   var video_drop_block = $("[data-block='video-drop-zone']");

   if (typeof(window.FileReader)){
      video_drop_block[0].ondragover = function() {
         video_drop_block.addClass('hover');
         return false;
      };

      video_drop_block[0].ondragleave = function() {
         video_drop_block.removeClass('hover');
         return false;
      };

      video_drop_block[0].ondrop = function(event) {
         event.preventDefault();
         video_drop_block.removeClass('hover');
         var file = event.dataTransfer.files;
         $('#upload-video').find('input').prop('files', file);
         $('#upload-video').submit();
      };
   }

	$('#upload-video').submit(function(event) {
      var file_size = $(".upload-video-file").prop('files')[0].size;
      if (file_size > "{{CONFIG max_upload}}") {
         swal({
            title: '{{LANG error}}',
            text:  "{{LANG file_is_too_big}} <?php echo pt_size_format($pt->config->max_upload); ?>",
            type: 'error',
            confirmButtonColor: '#3085d6',
            cancelButtonColor: '#d33',
            confirmButtonText: 'OK',
            buttonsStyling: true,
            confirmButtonClass: 'btn btn-success',
         }).then(function(){
            swal.close();
            $('.upload-video-file').val('');
         },
         function() {
            swal.close();
            $('.upload-video-file').val('');
         });
         return false;
      }
      else{
         var filename = $('.upload').val().split('\\').pop();

		 <?php if ($pt->user->admin == 1) { ?>$('.upload_msg').addClass('hidden');<?php } ?>

      }
   });

   $('#upload-video').ajaxForm({
	    url: '{{LINK aj/upload-video}}?hash=' + $('.main_session').val(),
       dataType:'json',
	    beforeSend: function() {
	    	   $('.progress').removeClass('hidden');
            var percentVal = '0%';
            bar.width(percentVal);
            percent.html(percentVal);
	    },
	    uploadProgress: function(event, position, total, percentComplete) {
	         if(percentComplete > 50) {
	            percent.addClass('white');
	         }
            var percentVal = percentComplete + '%';
            bar.width(percentVal);
            percent.html(percentVal);

            if (percentComplete == 100) {
               prcsvdo.html('<svg width="30" height="10" viewBox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="#<?php echo ($pt->mode == 'night') ? 'fff' : '222'?>"><circle cx="15" cy="15" r="15"><animate attributeName="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcMode="linear" repeatCount="indefinite" /><animate attributeName="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcMode="linear" repeatCount="indefinite" /></circle><circle cx="60" cy="15" r="9" fill-opacity="0.3"><animate attributeName="r" from="9" to="9" begin="0s" dur="0.8s" values="9;15;9" calcMode="linear" repeatCount="indefinite" /><animate attributeName="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcMode="linear" repeatCount="indefinite" /></circle><circle cx="105" cy="15" r="15"><animate attributeName="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcMode="linear" repeatCount="indefinite" /><animate attributeName="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcMode="linear" repeatCount="indefinite" /></circle></svg> {{LANG porcessing_video}}');
               $('.progress').find('.bar').removeClass('upload-progress-bar');
            }
        },
	    success: function(data) {

   	    	percentVal = '0%';
   	    	bar.width(percentVal);
            $('.progress').addClass('hidden');
            if (data.status == 200) {
            	$('.upload').addClass('hidden');
            	$(".pt_upvid_one").slideUp();
			    $(".pt_upvid_two").slideDown();
			    $('.pt_upload_vdo_step').addClass('step-two-active');
            	$('#video-location').val(data.file_path);
            	$('#uploaded_id').val(data.uploaded_id);
				Snackbar.show({showAction: false, pos: 'bottom-center', text: data.file_name + ' {{LANG successfully_uplaoded}}'});
            	$('#submit-btn').attr('disabled', false);
            	$('.upload-video-file').val('');
				$('.file_name').html(data.file_name);
                $('#title').val(data.file_name);
                <?php if (PT_IsAdmin()) { ?>
		         $('#movie_title').val(data.file_name);
		         <?php } ?>
            }
            else if(data.status == 401){
               swal({
                  title: '{{LANG oops}}!',
                  text: "{{LANG upload_limit_reached}}!",
                  type: 'info',
                  showCancelButton: true,
                  confirmButtonColor: '#3085d6',
                  cancelButtonColor: '#d33',
                  confirmButtonText: '{{LANG upgrade_now}}',
                  cancelButtonText: '{{LANG cancel}}',
                  confirmButtonClass: 'btn btn-success margin-right',
                  cancelButtonClass: 'btn',
                  buttonsStyling: false
               }).then(function(){
                  //Go pro
                  window.location.href = '{{LINK go_pro}}';
               },
               function() {
                  window.location.href = '{{LINK }}';
               });
            }
            else if(data.status == 402){
               swal({
                  title: '{{LANG error}}',
                  text: data.message,
                  type: 'error',
                  confirmButtonColor: '#3085d6',
                  cancelButtonColor: '#d33',
                  confirmButtonText: 'OK',
                  buttonsStyling: true,
                  confirmButtonClass: 'btn btn-success',
               }).then(function(){
                  swal.close();
                  $('.upload-video-file').val('');
               },
               function() {
                  swal.close();
                  $('.upload-video-file').val('');
               });
            }
            else {
				Snackbar.show({showAction: false,backgroundColor: '#e22e40',text: '<div>'+ data.error +'</div>'});
            }
	    }
	});

	$('#upload-form form').ajaxForm({
	    url: '{{LINK aj/submit-video}}?hash=' + $('.main_session').val(),
	    beforeSend: function() {
	    	$('#submit-btn').attr('disabled', true);
	    	$('#submit-btn').val("{{LANG please_wait}}");
	    },
	    success: function(data) {
	    	if (data.status == 200) {
	    		window.location.href = data.link;
	    	}
         else if(data.status == 402){
            swal({
               title: '{{LANG error}}',
               text: data.message,
               type: 'error',
               confirmButtonColor: '#3085d6',
               cancelButtonColor: '#d33',
               confirmButtonText: 'OK',
               buttonsStyling: true,
               confirmButtonClass: 'btn btn-success',
            }).then(function(){
               window.location.href = '{{LINK upload-video}}';
            },
            function() {
               window.location.href = '{{LINK }}';
            });
         }
         else {
	    		$('#submit-btn').attr('disabled', false);
	    	    $('#submit-btn').val('{{LANG publish}}');
				Snackbar.show({text: '<div>'+ data.message +'</div>'});
	    	}
	    }
	});

	$('.upload-video-file').on('change', function() {
   	$('#upload-video').submit();
	});
});

function PT_OpenUploadForm() {
	$('#upload-video').find('input').trigger('click');
}

jQuery(function($) {
	$(document).ready(function() {
		$( '.upload' ).on('click', function(e) {
			$( '.upload-video-file' ).trigger("click");
		});
	});
});
</script>
<style>.upload-s3-progressing{background: #4c9dd3;}</style>
